When you try to use gulp-sass to transport a specific SCSS file, you will not get the following error and you will not be able to:
[16:51:18] Error: Module did not self-register.
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous>(/Users/<user>/Documents/workspace/product/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:211:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous>(/Users/<user>/Documents/workspace/product/node_modules/gulp-sass/index.js:3:17)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
Error running task sequence: {task: 'styles:scss',
message: 'styles:scss catch',
duration : 0.127608784,
hrDuration: [0,127608784],
err —Error: Module did not self-register.
environment:
There are already similar problems with the issue of gulp-ass, and the following solutions have not been solved.
Tried Resolution:
Does anyone know how to solve this problem?Thank you for your cooperation
node.js gulp
Now that it's solved, I'll put it in order along with the problem.
Gulp-sass displays Error:Module did not self-register
environment:
gulp-sass is a node-sass wrapper that runs libsass, and the sourcemap output changed from object to string, so it was not compatible with v0.12 and io.js.
At the moment gulp-sass will not work with node 0.12 or io.js. gulp-sass is just a wrapper around node-sass, which implements node bindings to libsass. The maintainers of node-sass are doing their best to finish version 2.0, which will include support for node 0.12 and io.js. In the meantime, there is nothing I can do to make gulp-sass work on on anything other that node 0.10.xx. If you need to run gulp-sass, don't upgrade node until node-sass 2.0 is finalized.
https://github.com/dlmanning/gulp-sass/commit/5ee25e68da1805bea2c5e3da0a0ba10d80e36da2
Increase the gulp-ass version of package.json
to resolve the issue.
https://github.com/dlmanning/gulp-sass/commit/314ce5c1594e541a55e5c5009fb0733c45226567
© 2024 OneMinuteCode. All rights reserved.