Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module did not self-register #152

Closed
pokoot opened this issue Dec 23, 2014 · 16 comments
Closed

Module did not self-register #152

pokoot opened this issue Dec 23, 2014 · 16 comments

Comments

@pokoot
Copy link

pokoot commented Dec 23, 2014

Got this error

root@sandbox:/usr/share/nginx/html/Groovey(master) $ sudo npm install --no-bin-links
\
> node-sass@1.2.3 install /usr/share/nginx/html/Groovey/node_modules/gulp-sass/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /home/vagrant/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64/binding.node

> node-sass@1.2.3 postinstall /usr/share/nginx/html/Groovey/node_modules/gulp-sass/node_modules/node-sass
> node scripts/build.js

`linux-x64` exists; testing
module.js:355
  Module._extensions[extension](this, filename);
                               ^
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> (/home/vagrant/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:181: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)

npm ERR! node-sass@1.2.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@1.2.3 postinstall script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-40-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--no-bin-links"
npm ERR! cwd /usr/share/nginx/html/Groovey
npm ERR! node -v v0.13.0-pre
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
@dlmanning
Copy link
Owner

What are you trying to do here?

@pokoot
Copy link
Author

pokoot commented Dec 24, 2014

Installing gulp-sass produce this error message

@ghost
Copy link

ghost commented Jan 2, 2015

This worked for me: miguelcobain/ember-paper#13

You have to switch node.js from 0.13 to 0.10.

@dlmanning
Copy link
Owner

@pokoot : Whatever's going on here has to do with your configuration. It isn't gulp-sass specific.

@adregan
Copy link

adregan commented Jan 15, 2015

Most likely this is due to node unstable. I had the same problem but a quick n stable fixed it for me.

If you aren't using n, give it a try npm install -g n

@ekortright
Copy link

Installing n and doing a 'n stable' worked perfectly for me. Thanks @adregan

@costa
Copy link

costa commented Feb 9, 2015

@dlmanning You are perfectly right yet I don't think you must have closed the issue: rolling back to v0.10.36 — which helped me while v0.11 & v0.12 will not work — is not a solution, it's a workaround.
FYI, I have gulp-haml-coffee and gulp-coffee working in all the node versions.
Please check gulp-sass along with those under v0.12 (stable). Thank you.

@demisx
Copy link

demisx commented Feb 9, 2015

+1 Running into this issue with node 0.12.0. Other plugins work fine. Please fix it as soon as time permits, since it's breaking all of our builds. Thank you!

FYI, npm install -g n didn't work for me. Still same error.

@dlmanning
Copy link
Owner

See #189

@duellsy
Copy link

duellsy commented Feb 10, 2015

@demisx after you've installed n, you need to then use it to pick the version of npm you want, e.g.,

n 0.10.32

Which will give you output like this:

  install : v0.10.32
    mkdir : /usr/local/n/versions/0.10.32
    fetch : http://nodejs.org/dist/v0.10.32/node-v0.10.32-darwin-x64.tar.gz
installed : v0.10.32

@demisx
Copy link

demisx commented Feb 10, 2015

@duellsy Thank you. I haven't realized at first this was a node environment manager similar to nvm

@ninjasort
Copy link

0.10.32 works, but 0.12.0 stable is still throwing an error Error: Module did not self-register..

@mateeyow
Copy link

+1

@mieciu
Copy link

mieciu commented Feb 11, 2015

Fallen into same issue today
Was failing on Node v0.12.0:

./node_modules/.bin/gulp build
module.js:355
  Module._extensions[extension](this, filename);
                               ^
Error: Module did not self-register.

But runs successfully on v0.10.35.

@adregan
Copy link

adregan commented Feb 11, 2015

This is apparently a problem with node sass sass/node-sass#653 which is what gulp sass runs atop. And a fix is coming.

Unless you have some pressing need to run Node 0.12, I'd stick with 0.10.3x for the time being until everyone gets caught up (even though the release was two years coming ;) ). If you have someone in the office etc, who already upgraded (my boss, for example, just installed Node and as such had the new release), the above advice to use n or nvm to downgrade is pretty handy.

npm install -g n
n 0.10
node --version

@tcurdt
Copy link

tcurdt commented Feb 12, 2015

node-sass 2.0.1 is out now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests