Closed jamietre closed 8 years ago
I have also encountered this issue.
Reverting to 0.8 fixes it.
Its probably caused by line 32.
https://github.com/davidguttman/cssify/blob/master/lib/process-css.js#L32
Im using Node v4.2.4 and NPM 3.5.3. It also is a problem in NPM 2.X
I try to require normalize.css with cssify
require('normalize.css'); // normalize.css not found
// Error: Cannot find module 'normalize.css' from ...
require('normalize.css/normalize.css');
// html {
// ^
// ParseError: Unexpected token
There's a number of issues here. It seems like Windows users are most affected by this (?).
0.8 also solved issues for me, and allowed inclusions to work. If you try to work around this issue by using path.resolve
, it will appear to work but not actually include the file on build (silent failure!)
I agree this is a Windows issue, because the Windows backslashes generated by path.relative are being dropped into the moduleSource unescaped and therefore are disappearing. The fix is to escape them or use unixy forward-slashes. For instance, I modified process-css.js
requirePath = requirePath.replace(/\\/g, '\\\\');
or
requirePath = requirePath.replace(/\\/g, '/');
I'm going to submit a PR.
I encountered this error on Mac - just saying. Ill test to see if it fixes the issue for me today.
any solution here?
Works in 0.8.0, broken in 1.0.2. The following error is reported by Browserify
When module is installed:
When module is linked:
It seems to be resolving the path incorrectly...
This is being imported globally, e.g.
Obviously I am on windows but it also doesn't work on our linux dev server so doubt it's related.