I tried to generate the Yeoman backbone generator. Here's what it's trying to tell me.
$ yo backbone
Binary downloaded and installed at /Users/indreklasn/Work/backbone-app/node_modules/grunt-sass/node_modules/node-sass/vendor/darwin-x64/binding.node
[email protected] postinstall /Users/indreklasn/Work/backbone-app/node_modules/grunt-sass/node_modules/node-sass
node scripts/build.js
darwin-x64 exists; testing
module.js:355
Module._extensionsextension;
^
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.
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! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.14.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node scripts/build.js'.
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! Please include the following file with any support request:
npm ERR! /Users/indreklasn/Work/backbone-app/npm-debug.log
Any clues?
Can you upgrade to [email protected]? Just npm install node-sass.
Indreks-MBP% sudo npm install node-sass
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm WARN package.json [email protected] No license field.
[email protected] postinstall /Users/indreklasn/Work/backbone-app/node_modules/node-sass/node_modules/cross-spawn/node_modules/spawn-sync
node postinstall
[email protected] install /Users/indreklasn/Work/backbone-app/node_modules/node-sass
node scripts/install.js
Binary downloaded and installed at /Users/indreklasn/Work/backbone-app/node_modules/node-sass/vendor/darwin-x64-14/binding.node
[email protected] postinstall /Users/indreklasn/Work/backbone-app/node_modules/node-sass
node scripts/build.js
/Users/indreklasn/Work/backbone-app/node_modules/node-sass/vendor/darwin-x64-14/binding.node exists.
testing binary.
Binary is fine; exiting.
[email protected] node_modules/node-sass
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Indreks-MBP% npm node-sass -v
2.14.1
Also tried the following:
Indreks-MBP% sudo npm install [email protected]
Doesn't seem to upgrade it. I searched a little on google but didn't find a fix yet.
Indreks-MBP% sudo npm install node-sass
Binary is fine; exiting.
[email protected] node_modules/node-sass
Everything is fine ^^
(...)
Indreks-MBP% npm node-sass -v
2.14.1
This is your npm version, not node-sass's.
Ah, sorry about that. That was embarrassing. Anyways I updated my Node, NPM and sass-node to the latest versions out there. Deleted my dir, refreshed terminals.
Then tried again:
$ yo backbone
I get the same error.
Binary downloaded and installed at /Users/indreklasn/Work/backbone-app/node_modules/grunt-sass/node_modules/node-sass/vendor/darwin-x64/binding.node
[email protected] postinstall /Users/indreklasn/Work/backbone-app/node_modules/grunt-sass/node_modules/node-sass
node scripts/build.js
darwin-x64 exists; testing
module.js:355
Module._extensionsextension;
^
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.
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node scripts/build.js'.
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! Please include the following file with any support request:
npm ERR! /Users/indreklasn/Work/backbone-app/npm-debug.log
Is the cause somehow by my end? Is the yo generator trying to fetch somewhat outdated sass-node? I installed the node-sass 3.3.3 globally.
On Wed, 23 Sep 2015, Indrek Lasn wrote:
$ yo backbone
I get the same error.
Binary downloaded and installed at /Users/indreklasn/Work/backbone-app/node_modules/grunt-sass/node_modules/node-sass/vendor/darwin-x64/binding.node
[email protected] postinstall /Users/indreklasn/Work/backbone-app/node_modules/grunt-sass/node_modules/node-sass
^^^^^^^^^^^^^^^^^^^^
Is the cause somehow by my end?
grunt-sass insists you should use [email protected] which is too old to work on your node.
The current version is [email protected]
try...
sudo ln -s /usr/bin/nodejs /usr/bin/node
@jpeguerocastro this has solved the issue for me, thank you
Someone from another forum suggested npm install --no-optional to cure this but it did not work for me.
No matter what I do I cannot get past node-sass during an npm install!
Hindsight: This happens when you install a new version of Node and the node-sass package is bind to the older Node version.
Here's how you fix it: rm -rf node_modules && npm rebuild node-sass && npm i
Most helpful comment
try...
sudo ln -s /usr/bin/nodejs /usr/bin/node