Can't install module node-sass npm
I am trying to install the npm "node-sass" module on my Ubuntu 14.04 distribution.
When I ran
However, when trying to install node-ass and harp using this command:
sudo npm install -g harp
I am getting the following error:
child_process: customFds option is deprecated, use stdio instead. gyp ERR! configure error gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16) gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37) gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20) gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9 gyp ERR! stack at ChildProcess.exithandler (child_process.js:722:7) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at maybeClose (child_process.js:999:16) gyp ERR! stack at Socket.<anonymous> (child_process.js:1167:11) gyp ERR! stack at Socket.emit (events.js:107:17) gyp ERR! stack at Pipe.close (net.js:461:12) gyp ERR! System Linux 3.13.0-36-generic gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/harp/node_modules/terraform/node_modules/node-sass gyp ERR! node -v v0.13.0-pre gyp ERR! node-gyp -v v0.13.1 gyp ERR! not ok Build failed npm ERR! email@example.com install: `node build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the firstname.lastname@example.org install 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 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-36-generic npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "harp" npm ERR! cwd /home/colin npm ERR! node -v v0.13.0-pre npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/colin/npm-debug.log npm ERR! not ok code 0
Note that the error indicates that my node version is still v0.13.0-pre, even though I switched to 0.10.32 from nvm.
source to share
The question is 3 years old, but I recently ran into the same problem on osx trying to install
and couldn't find a solution elsewhere.
After several attempts, it was possible to solve the problem with the modifier
, for example:
sudo npm install --global --unsafe-perm harp
Installation was successful and everything works, hope it helps :)
source to share