Node-sass: I had this problem with the installation

Created on 24 Aug 2018  路  1Comment  路  Source: sass/node-sass

  • NPM version (npm -v):
  • Node version (node -v):
  • Node Process (node -p process.versions):
  • Node Platform (node -p process.platform):
  • Node architecture (node -p process.arch):
  • node-sass version (node -p "require('node-sass').info"):
  • npm node-sass versions (npm ls node-sass):
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/wangliuyong/desktop/webpack-demo/node_modules/node-sass/build'
gyp ERR! System Linux 4.4.0-133-generic
gyp ERR! command "/usr/local/bin/node" "/home/wangliuyong/desktop/webpack-demo/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/wangliuyong/desktop/webpack-demo/node_modules/node-sass
gyp ERR! node -v v10.8.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Most helpful comment

It sounds like you're running as sudo, this is covered in https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#linux

>All comments

It sounds like you're running as sudo, this is covered in https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#linux

Was this page helpful?
0 / 5 - 0 ratings