Node-sass: Failed at the [email protected] postinstall script 'node scripts/build.js' Exit in ionic3 ?

Created on 24 Oct 2018  Â·  6Comments  Â·  Source: sass/node-sass

Hello, i have a problem after install -
sudo npm install @ionic/app-scripts@latest

Version used :
Node : v8.10.0
npm : 6.3.0
OS : Linux 4.13

Setps for reproduce:
sudo npm install -g [email protected] --unsafe-perm=true --allow-root
sudo ln -s /usr/bin/nodejs /usr/bin/node

The error is:
```
yp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ubuntu2/git/bob-app/node_modules/node-sass/build'
gyp ERR! System Linux 4.13.0-45-generic
gyp ERR! command "/usr/bin/node" "/home/ubuntu2/git/bob-app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/ubuntu2/git/bob-app/node_modules/node-sass
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ubuntu2/git/bob-app/node_modules/node-sass/build'
gyp ERR! System Linux 4.13.0-45-generic
gyp ERR! command "/usr/bin/node" "/home/ubuntu2/git/bob-app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/ubuntu2/git/bob-app/node_modules/node-sass
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN @ionic-native/[email protected] requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.

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 comp
```lete log of this run can be found in:
npm ERR! /home/ubuntu2/.npm/_logs/2018-10-24T10_19_43_462Z-debug.log

Most helpful comment

Sir above cmd is not working for me but below command working -
sudo npm install @ionic/app-scripts@latest--unsafe-perm=true --allow-root

All 6 comments

Error: EACCES: permission denied, mkdir
'/home/ubuntu2/git/bob-app/node_modules/node-sass/build

Check you permissions. Make sure you're not running npm as sudo.

On Wed., 24 Oct. 2018, 9:24 pm kapil soni, notifications@github.com wrote:

Hello, i have a problem after install -
sudo npm install @ionic/app-scripts@latest

Version used :
Node : v8.10.0
npm : 6.3.0
OS : Linux 4.13

Setps for reproduce:
sudo npm install -g [email protected] --unsafe-perm=true --allow-root
sudo ln -s /usr/bin/nodejs /usr/bin/node

The error is:

yp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ubuntu2/git/bob-app/node_modules/node-sass/build'
gyp ERR! System Linux 4.13.0-45-generic
gyp ERR! command "/usr/bin/node" "/home/ubuntu2/git/bob-app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/ubuntu2/git/bob-app/node_modules/node-sass
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ubuntu2/git/bob-app/node_modules/node-sass/build'
gyp ERR! System Linux 4.13.0-45-generic
gyp ERR! command "/usr/bin/node" "/home/ubuntu2/git/bob-app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/ubuntu2/git/bob-app/node_modules/node-sass
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN @ionic-native/[email protected] requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.

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 comp
```lete log of this run can be found in:
npm ERR! /home/ubuntu2/.npm/_logs/2018-10-24T10_19_43_462Z-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/2523, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWKO97Le2tvL7vbLbbwU2ysfsge4Iks5uoD_ngaJpZM4X3mlg
.

Sir i have already running npm as sudo but not working errror is not resolve ?

Don't use sudo. If you must then you'll need to add the --unsafe-perms flag

On Thu., 25 Oct. 2018, 4:13 am kapil soni, notifications@github.com wrote:

Sir i have already running npm as sudo but not working errror is not
resolve ?

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/2523#issuecomment-432747174,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWAuPyunYoAIeo5llvMr6_w6TIxLFks5uoJ_MgaJpZM4X3mlg
.

Sir above cmd is not working for me but below command working -
sudo npm install @ionic/app-scripts@latest--unsafe-perm=true --allow-root

genio gracias

Para evitar cualquier error ejecutar :
sudo npm install --unsafe-perm=true --allow-root
saludos.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexandrubau picture alexandrubau  Â·  3Comments

tjistooshort picture tjistooshort  Â·  4Comments

Pixelatex picture Pixelatex  Â·  3Comments

NathanKleekamp picture NathanKleekamp  Â·  4Comments

mkbctrl picture mkbctrl  Â·  4Comments