PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

HTML tags not being transpiled correctly

Open sethreidnz opened this issue 10 years ago • 10 comments

When running the app it works just fine but some of hte HTML in the index.html is not being processed into how it should be.. See screenshot

Issue

Am I doing something wrong?

sethreidnz avatar May 22 '16 23:05 sethreidnz

Same here but on OSX - no errors in build, but same issue with css/index.html rendering just like your screenshot there.

seandogg avatar May 23 '16 03:05 seandogg

that might be a problem with the html plugin

PatrickJS avatar May 23 '16 03:05 PatrickJS

Just to clarify that error in my first comment is not relevant. Have fixed that on my machine now. Edited it to reflect this.

sethreidnz avatar May 23 '16 07:05 sethreidnz

+1 same for me

oryam avatar Jun 14 '16 08:06 oryam

The screen shot is not showing up. Is this related to seeing this at the top of the page?

<% if (webpackConfig.htmlElements.headTags) { %> <%= webpackConfig.htmlElements.headTags %> <% } %>

Something is not handling the html preprocessing. This looks like Razor tags from .NET MVC, but I am not sure what module is supposed to handle the processing of this. I do see this warning when running 'npm start', so it might be related:

WARNING in (webpack)/buildin/module.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.

WARNING in ./~/webpack/buildin/module.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.

RobCannon avatar Jul 03 '16 16:07 RobCannon

cc @shlomiassaf

PatrickJS avatar Jul 03 '16 17:07 PatrickJS

I have found what the issue is and a work-around, but not a permanent fix. The details are in the webpack issue below. The work around is, on a Windows machine, make sure you use a capital letter for your drive letter when you cd to your project directory. I.E.

c:\Projects\angular2-webpack-starter>cd C:\projects
C:\Projects>cd angular2-webpack-starter
C:\Projects\angular2-webpack-starter>

Notice that I had to change to a different folder first, otherwise Windows does not change the case of the drive letter since it doesn't consider the directory to have changed.

The core issue is that __dirname is returning a value with an upper case drive letter but cwd() will return a lower case drive letter (unless you use the work around above). This needs to be fixed in nodejs. Be sure and follow issue at the last link so the nodejs team will know.

https://github.com/webpack/webpack/issues/2362 https://github.com/nodejs/node/issues/6624

RobCannon avatar Jul 03 '16 18:07 RobCannon

@RobCannon when I read it I couldn't believe it, but as my last freaking bullet I tried it with zero faith and, oh my god... that is precisely the problem... Thanks for sharing, mate.

supermarcos avatar Aug 19 '16 03:08 supermarcos

The issue in Node has been marked as fixed. I doesn't look like it has been released yet.

RobCannon avatar Aug 19 '16 11:08 RobCannon

So I still have this issue going on is there a workaround or can I roll back to an older version? I'm on a Macbook not windows

msegers avatar Oct 04 '16 07:10 msegers