Node-sass: Can't install node-sass anymore

Created on 10 Jun 2018  Â·  5Comments  Â·  Source: sass/node-sass

Hello. For some reason I can't install node-sass anymore. I have already installed node-sass on this computer and on different projects (macOS High Sierra - v 10.13.4) and up until last week everything was working fine. I started a new project recently and I am getting an error now.

I am on the last version of Node and npm and I am trying to install node-sass: 4.9.0. I have tried running the command as Sudo but no luck. Here is the error and the information requested (I have also attached the error log file).

npm: v6.1.0

node: v8.11.2

node process: { http_parser: '2.8.0',
node: '8.11.2',
v8: '6.2.414.54',
uv: '1.19.1',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '57',
nghttp2: '1.29.0',
napi: '3',
openssl: '1.0.2o',
icu: '60.1',
unicode: '10.0',
cldr: '32.0',
tz: '2017c' }

node platform: darwin

node architecture: x64

node sass version: 4.9.0

error

[email protected] install /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass
node scripts/install.js

Unable to save binary /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/vendor/darwin-x64-57 : { Error: EACCES: permission denied, mkdir '/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/vendor'
at Object.fs.mkdirSync (fs.js:885:18)
at sync (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/mkdirp/index.js:71:13)
at Function.sync (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/scripts/install.js:114:11)
at Object. (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/scripts/install.js:157:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/vendor' }

[email protected] postinstall /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass
node scripts/build.js

Building: /usr/local/bin/node /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli '/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which failed Error: not found: python2
gyp verb which failed at getNotFoundError (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:13:12)
gyp verb which failed at F (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:68:19)
gyp verb which failed at E (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:80:29)
gyp verb which failed at /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:89:16
gyp verb which failed at /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/index.js:42:5
gyp verb which failed at /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/mode.js:8:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed python2 { Error: not found: python2
gyp verb which failed at getNotFoundError (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:13:12)
gyp verb which failed at F (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:68:19)
gyp verb which failed at E (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:80:29)
gyp verb which failed at /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:89:16
gyp verb which failed at /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/index.js:42:5
gyp verb which failed at /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/mode.js:8:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed stack: 'Error: not found: python2\n at getNotFoundError (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:13:12)\n at F (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:68:19)\n at E (/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:80:29)\n at /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:89:16\n at /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/index.js:42:5\n at /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/mode.js:8:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb which failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb which succeeded python /usr/bin/python
gyp verb check python version /usr/bin/python -c "import platform; print(platform.python_version());" returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.11.2
gyp verb command install [ '8.11.2' ]
gyp verb install input version string "8.11.2"
gyp verb install installing version: 8.11.2
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.11.2
gyp verb build dir attempting to create "build" dir: /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/build'
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of postcss-syntax@>=0.26.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of postcss-syntax@>=0.27.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 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.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/michelecocuccio/.npm/_logs/2018-06-09T22_43_52_510Z-debug.log
2018-06-09T22_31_10_020Z-debug.log

Most helpful comment

Fixed this issue by using yarn instead.

All 5 comments

You should not use side with npm. If you must then you'll need to use the
--unsafe-perms flag

On Sun., 10 Jun. 2018, 12:49 am Michele, notifications@github.com wrote:

Hello. For some reason I can't install node-sass anymore. I have already
installed node-sass on this computer and on different projects (macOS High
Sierra - v 10.13.4) and up until last week everything was working fine. I
started a new project recently and I am getting an error now.

I am on the last version of Node and npm and I am trying to install
node-sass: 4.9.0. I have tried running the command as Sudo but no luck.
Here is the error and the information requested (I have also attached the
error log file).

npm: v6.1.0

node: v8.11.2

node process: { http_parser: '2.8.0',
node: '8.11.2',
v8: '6.2.414.54',
uv: '1.19.1',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '57',
nghttp2: '1.29.0',
napi: '3',
openssl: '1.0.2o',
icu: '60.1',
unicode: '10.0',
cldr: '32.0',
tz: '2017c' }

node platform: darwin

node architecture: x64

node sass version: 4.9.0

error

[email protected] install
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass
node scripts/install.js

Unable to save binary
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/vendor/darwin-x64-57
: { Error: EACCES: permission denied, mkdir
'/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/vendor'
at Object.fs.mkdirSync (fs.js:885:18)
at sync
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/mkdirp/index.js:71:13)
at Function.sync
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/scripts/install.js:114:11)
at Object.
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/scripts/install.js:157:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path:
'/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/vendor'
}

[email protected] postinstall
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass
node scripts/build.js

Building: /usr/local/bin/node
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-gyp/bin/node-gyp.js
rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags=
--libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli
'/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which failed Error: not found: python2
gyp verb which failed at getNotFoundError
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:13:12)
gyp verb which failed at F
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:68:19)
gyp verb which failed at E
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:80:29)
gyp verb which failed at
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:89:16
gyp verb which failed at
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/index.js:42:5
gyp verb which failed at
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/mode.js:8:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed python2 { Error: not found: python2
gyp verb which failed at getNotFoundError
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:13:12)
gyp verb which failed at F
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:68:19)
gyp verb which failed at E
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:80:29)
gyp verb which failed at
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:89:16
gyp verb which failed at
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/index.js:42:5
gyp verb which failed at
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/mode.js:8:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed stack: 'Error: not found: python2\n at
getNotFoundError
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:13:12)\n
at F
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:68:19)\n
at E
(/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:80:29)\n
at
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/which/which.js:89:16\n
at
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/index.js:42:5\n
at
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/isexe/mode.js:8:5\n
at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb which failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb which succeeded python /usr/bin/python
gyp verb check python version /usr/bin/python -c "import platform;
print(platform.python_version());" returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host
node version: 8.11.2
gyp verb command install [ '8.11.2' ]
gyp verb install input version string "8.11.2"
gyp verb install installing version: 8.11.2
gyp verb install --ensure was passed, so won't reinstall if already
installed
gyp verb install version is already installed, need to check
"installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.11.2
gyp verb build dir attempting to create "build" dir:
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir
'/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass/build'
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node"
"/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-gyp/bin/node-gyp.js"
"rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags="
"--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd
/Users/michelecocuccio/Documents/STUDIO/JavaScript/React/expensify/node_modules/node-sass
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN [email protected] requires a peer of [email protected] - 3 but none is
installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.3 but none is
installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of postcss-syntax@>=0.26.0
but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of postcss-syntax@>=0.27.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 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.

npm ERR! A complete log of this run can be found in:
npm ERR!
/Users/michelecocuccio/.npm/_logs/2018-06-09T22_43_52_510Z-debug.log
2018-06-09T22_31_10_020Z-debug.log
https://github.com/sass/node-sass/files/2087403/2018-06-09T22_31_10_020Z-debug.log

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/2411, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWD8cwvtTxveYW5QzM_3IUPWqyHYyks5t7FDigaJpZM4UhguJ
.

Thanks for the reply. Can you please be more specific? What do you mean by "I shouldn't use "side" with NPM? "

Thanks

Sorry I mean you should never use sudo with npm because you'll have
permission errors.

On Sun., 10 Jun. 2018, 1:29 pm Michele, notifications@github.com wrote:

Thanks for the reply. Can you please be more specific? What do you mean by
"I shouldn't use "side" with NPM? "

Thanks

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

Fixed this issue by using yarn instead.

Same problem using --unsafe-perms. The problem is that node-sass doesn't exist, so it can't create one inside it.

Was this page helpful?
0 / 5 - 0 ratings