-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Error: Module did not self-register #1895
Comments
This error suggest that the binary you have installed does not match your current environment. If you run the following you should see a
This usually happens the node version is changed between |
As stated previously, I had already run
|
Hmm we changed the way the windows binaries were build in 4.5.0. Can you try 4.4.0 to rule that out? |
Sorry, same issue in 4.4.0. :( |
The error suggests the binary is broken. Can you replacing the binary in
the vendor folder with the one from the GitHub release
…On 13 Feb. 2017 12:48 pm, "Michael Loughry" ***@***.***> wrote:
Sorry, same issue in 4.4.0. :(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1895 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWAVZoPp0pNHgWTC0X3__4wX1Ze4Gks5rb7ZvgaJpZM4L-seP>
.
|
Same issue when I replace |
The error appears to be environmental. There's something about how you're using webpack/node-sass that is causing the issue. How are you executing webpack? What's the full output of Which loader are you using for node-sass? |
We're returning a webpack compiler instance from a gulp task (Typescript code below):
|
I don't really know how to progress this. Are you able to create a small GH repo that reproduce this issue so I can dig around it locally? |
I suspect there's something about how you're using gulp + webpack + typescript that is causing an issue, and by going through the exercise of peeling back the layers you'll stumble upon it. |
I have a minified repro that I'm working on cleaning up before I upload. However, one key finding is that the trigger for this bug is having two separate rules entries that trigger the
If I comment out all imports of |
Managed to hack our project down to a fairly minimal repro: https://github.com/MLoughry/node-sass-issue-1895 |
As an additional data point: when I first implemented the global/component styles distinction in our project, I had originally tried to use |
Hi! I am stuck with the same issue. My case is a little different, I have two repos:
I have cloned the two repos, A and B. When I go to A and run tests works perfect (with mocha). If I go to B, works fine if I require A from the cloned folder ( I tried (nothing worked, same results always):
Versions:
Thank you! |
Is there any progress on this, with or without my provided repro? Is there anything more I can provide to help the investigation? |
Apologies I have missed the update on this issue. I'll take another look this weekend. |
I have the same issue here, any news |
Ping. This is blocking my team's upgrade path to Webpack 2.0 |
For info, we had the problem during initial configuration of Webpack 2 in our project, fixing the errors (there were so many), made the problem disappeared. |
I've figured out that the issue that causes the re-entrancy is that the Windows drive letter casing can change between calls to binding, which in Node results in two separate instances of the module being created. In other words, two code paths might pass I've verified a hack fix locally that normalizes the drive letter. I'll work on a proper PR to submit tomorrow. |
…ackage Lower version of node-sass may failed to build in some machines (included travis ci): sass/node-sass#1895
Error persists in my environment even with the solution applied. The first call was made with the path "f:\Projects\Surface\workbench\modules\source@surface\ compiler\node_modules\node-sass\vendor\win32-x64-59\binding.node". What would be the impact of forcing the path case, since this call to binding seems to be encapsulated within the module? UpdateDebugging a little more. I have found that the problem may be related to other factors. Forcing the path case at this point fixes my problem, but causes the webpack to raise the following alert: WARNING in F:/Projects/Surface/workbench/modules/source/@surface/compiler/node_modules/css-loader/lib/css-base.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* F:\Projects\Surface\workbench\modules\source\@surface\compiler\node_modules\css-loader\lib\css-base.js
Used by 1 module(s), i. e.
F:\Projects\Surface\workbench\modules\source\@surface\compiler\node_modules\css-loader\index.js!F:\Projects\Surface\workbench\modules\source\@surface\compiler\node_modules\sass-loader\lib\loader.js!F:\Projects\Surface\workbench\modules\source\@surface\menu\index.scss
* f:\Projects\Surface\workbench\modules\source\@surface\compiler\node_modules\css-loader\lib\css-base.js
Used by 1 module(s), i. e.
f:\Projects\Surface\workbench\modules\source\@surface\compiler\node_modules\css-loader\index.js!f:\Projects\Surface\workbench\modules\source\@surface\compiler\node_modules\sass-loader\lib\loader.js!f:\Projects\Surface\workbench\client\source\app\index.scss Now I suspect it is something related to the resolution of symbolic links in the webpack. |
This problem can also appear on Windows if you're using |
I'm in the process of upgrading my team's project to webpack 2, and I'm now encountering numerous "Module did not self-register" errors for
.scss
files, both locally and in our build system. Example errors for one file:When I search for the error, I find issues opened ~2 years ago that have all allegedly been fixed since, but nothing more recently. I've followed the Troubleshooting guide, and tried such suggestions as doing a clean
npm install
(which our build system does anyway) and runningnpm rebuild
, to no avail.npm -v
):3.10.10
node -v
):v6.9.5
node -p process.versions
):node -p process.platform
):win32
node -p process.arch
):x64
node -p "require('node-sass').info"
):npm ls node-sass
):[email protected]
The text was updated successfully, but these errors were encountered: