node-sass: Failed at the node-sass@3.6.0 postinstall script 'node scripts/build.js' Exit status 1

Hello, i have a problem when i try to do this:

npm install -g node-sass@3.6.0

My computer has this configuration:

OS: Windows 7 64 bits node v4.2.1 npm v3.9.5

The error is:

npm ERR! Windows_NT 6.1.7601 npm ERR! argv “C:\Program Files (x86)\nodejs\node.exe” “C:\Users\Myuser\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “install” “node-sass@3.6.0” “-g” npm ERR! node v4.2.1 npm ERR! npm v3.9.5 npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.6.0 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@3.6.0 postinstall script ‘node scripts/build.js’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, 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 information on how to open an issue for this project with: npm ERR! npm bugs node-sass npm ERR! Or if that isn’t available, 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! C:\Users\JRCI\npm-debug.log npm ERR! code 1

I also try to install the node-sass 3.6.0 and 3.4.2 versions but i have the same problem.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 37 (11 by maintainers)

Most upvoted comments

sudo ln -s /usr/bin/nodejs /usr/bin/node this helped for me

Still waiting on a Solution for this installation error of node-sass@3.8.0 postinstall

These look like permission issues. Make sure you have permission execute in your install directory. You can confirm a permission issue with npm install --unsafe-perm On 3 Jul 2016 1:37 AM, “Alexius Lee” notifications@github.com wrote:

Maybe a same issue here with node@6.1.0 & node-sass@3.8.0 on Ubuntu and Mac.

npm ERR! Linux 3.13.0-32-generic npm ERR! argv “/root/.nvm/versions/node/v6.1.0/bin/node” “/root/.nvm/versions/node/v6.1.0/bin/npm” “i” npm ERR! node v6.1.0 npm ERR! npm v3.8.6 npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.8.0 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@3.8.0 postinstall script ‘node scripts/build.js’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, 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 information on how to open an issue for this project with: npm ERR! npm bugs node-sass npm ERR! Or if that isn’t available, 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! /var/app/plover/npm-debug.log

npm-debug.log

155769 info lifecycle lodash.assign@4.0.9~postinstall: lodash.assign@4.0.9 155770 silly lifecycle lodash.assign@4.0.9~postinstall: no script for postinstall, continuing 155771 silly postinstall yargs-parser@2.4.0 /var/app/plover/node_modules/.staging/yargs-parser-32b5586d 155772 info lifecycle yargs-parser@2.4.0~postinstall: yargs-parser@2.4.0 155773 silly lifecycle yargs-parser@2.4.0~postinstall: no script for postinstall, continuing 155774 silly postinstall yargs@4.7.1 /var/app/plover/node_modules/.staging/yargs-f3907e84 155775 info lifecycle yargs@4.7.1~postinstall: yargs@4.7.1 155776 silly lifecycle yargs@4.7.1~postinstall: no script for postinstall, continuing 155777 silly postinstall sass-graph@2.1.2 /var/app/plover/node_modules/.staging/sass-graph-8b66ed02 155778 info lifecycle sass-graph@2.1.2~postinstall: sass-graph@2.1.2 155779 silly lifecycle sass-graph@2.1.2~postinstall: no script for postinstall, continuing 155780 silly postinstall node-sass@3.8.0 /var/app/plover/node_modules/.staging/node-sass-3b0a8fff 155781 info lifecycle node-sass@3.8.0~postinstall: node-sass@3.8.0 155782 verbose lifecycle node-sass@3.8.0~postinstall: unsafe-perm in lifecycle false 155783 verbose lifecycle node-sass@3.8.0~postinstall: PATH: /root/.nvm/versions/node/v6.1.0/lib/node_modules/npm/bin/node-gyp-bin:/var/app/plover/node_modules/node-sass/node_modules/.bin:/var/app/plover/n ode_modules/.bin:/root/.nvm/versions/node/v6.1.0/bin:/root/.nvm/versions/node/v6.1.0/bin:/usr/lib/jvm/jdk1.8.0_77/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/gam es 155784 verbose lifecycle node-sass@3.8.0~postinstall: CWD: /var/app/plover/node_modules/node-sass 155785 silly lifecycle node-sass@3.8.0~postinstall: Args: [ ‘-c’, ‘node scripts/build.js’ ] 155786 silly lifecycle node-sass@3.8.0~postinstall: Returned: code: 1 signal: null 155787 info lifecycle node-sass@3.8.0~postinstall: Failed to exec postinstall script 155788 verbose unlock done using /root/.npm/_locks/staging-c074e8948ca27c12.lock for /var/app/plover/node_modules/.staging 155789 silly rollbackFailedOptional Starting 155790 silly rollbackFailedOptional Finishing 155791 silly runTopLevelLifecycles Starting 155792 silly runTopLevelLifecycles Finishing 155793 silly install printInstalled 155794 warn optional Skipping failed optional dependency /chokidar/fsevents: 155795 warn notsup Not compatible with your operating system or architecture: fsevents@1.0.12 155796 warn browserify-shim@2.0.10 requires a peer of browserify@>= 2.3.0 < 4 but none was installed. 155797 verbose stack Error: node-sass@3.8.0 postinstall: node scripts/build.js 155797 verbose stack Exit status 1 155797 verbose stack at EventEmitter.<anonymous> (/root/.nvm/versions/node/v6.1.0/lib/node_modules/npm/lib/utils/lifecycle.js:239:16) 155797 verbose stack at emitTwo (events.js:106:13) 155797 verbose stack at EventEmitter.emit (events.js:191:7) 155797 verbose stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v6.1.0/lib/node_modules/npm/lib/utils/spawn.js:24:14) 155797 verbose stack at emitTwo (events.js:106:13) 155797 verbose stack at ChildProcess.emit (events.js:191:7) 155797 verbose stack at maybeClose (internal/child_process.js:850:16) 155797 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) 155798 verbose pkgid node-sass@3.8.0 155799 verbose cwd /var/app/plover 155800 error Linux 3.13.0-32-generic 155801 error argv “/root/.nvm/versions/node/v6.1.0/bin/node” “/root/.nvm/versions/node/v6.1.0/bin/npm” “i” 155802 error node v6.1.0 155803 error npm v3.8.6 155804 error code ELIFECYCLE 155805 error node-sass@3.8.0 postinstall: node scripts/build.js 155805 error Exit status 1 155806 error Failed at the node-sass@3.8.0 postinstall script ‘node scripts/build.js’. 155806 error Make sure you have the latest version of node.js and npm installed. 155806 error If you do, this is most likely a problem with the node-sass package, 155806 error not with npm itself. 155806 error Tell the author that this fails on your system: 155806 error node scripts/build.js 155806 error You can get information on how to open an issue for this project with: 155806 error npm bugs node-sass 155806 error Or if that isn’t available, you can get their info via: 155806 error npm owner ls node-sass 155806 error There is likely additional logging output above. 155807 verbose exit [ 1, true ]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sass/node-sass/issues/1581#issuecomment-230107670, or mute the thread https://github.com/notifications/unsubscribe/AAjZWJJ5Ptf7aae5t0EBi9eaSDXG5wJXks5qRoXHgaJpZM4Ivwv- .

I was having this issue in an alpine docker image. I eventually found that I needed g++ available so that node-sass could run the build script. (I already had nodejs, python & make)

@Pizdetss what a nickname, man

I’m having the same problem with 3.8: npm ERR! node v4.4.2 npm ERR! npm v2.15.0 npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.8.0 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@3.8.0 postinstall script ‘node scripts/build.js’.

Yes, node is on my path.

@dongalor your ancient node-sass@0.9.6 will not work with the recent node engines. Please update node-sass to the latest version.

Sometimes works and sometimes doesn’t (IN HEROKU)

package.json “scripts”: { “preinstall”: “npm rebuild node-sass && npm i typings@2.1.0 -g && npm install -g typescript@2.2.2 && typings install && tsc -p tsconfig.json”, “postinstall”: “ng build”, }

I have tried using node 10.4.1 but it also doesn’t work, same error caused. Need professional help

upgrade to the latest Node.js (v10+) and this should resolve the issue

It help me. 👍