krasimir / cssx

CSS in JavaScript
http://krasimir.github.io/cssx/
MIT License
1.01k stars 35 forks source link

Cannot resolve module "cssx" in module "infamous" although module "infamous" does not use "cssx". #15

Closed trusktr closed 8 years ago

trusktr commented 8 years ago

I'm getting a really strange error. I have a package, infamous, and as you can see, it does not contain the word "cssx" anywhere in it's source code.

However, when I build my app with Webpack, I get the following extremely bizarre errors:

ERROR in ../infamous+infamous/motor-html/push-pane-layout.js
Module not found: Error: Cannot resolve module 'cssx' in /Users/trusktr/src/infamous+infamous/motor-html
 @ ../infamous+infamous/motor-html/push-pane-layout.js 31:12-29

ERROR in ../infamous+infamous/motor-html/push-pane-layout.js
Module not found: Error: Cannot resolve module 'cssx' in /Users/trusktr/src/infamous+infamous/motor-html
 @ ../infamous+infamous/motor-html/push-pane-layout.js 35:22-56

Not sure if this is related to CSSX, but since CSSX is mentioned in the error I thought I'd bring it up here. It could be some bizarre Webpack error. I don't seem to get this error when importing the same module using ES6 Modules in Meteor. Note also my infamous package is npm linked, which has brought up issues in the past.

Any ideas?

trusktr commented 8 years ago

Aha! I remember now, indeed it is an error with no intuitive solution whatsoever: https://github.com/webpack/webpack/issues/811

(^ cc @sokra, I think this behavior should be changed in Webpack, as it is not intuitive at all.)

krasimir commented 8 years ago

Weird indeed.