Angular-cli: Failed at the [email protected] postinstall script 'node scripts/build.js'.

Created on 9 Nov 2016  路  10Comments  路  Source: angular/angular-cli

Hi,

i got 'Failed at the [email protected] postinstall script 'node scripts/build.js'.' error while installing angular-cli globally on my system.

System Information:

Windows 7 Professional Service Pack 1 (x64)
Node 4.6.1
NPM 3.10.9

Debug File Info:

187936 silly lifecycle [email protected]: no script for postinstall, continuing
187937 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingyargs-8b3c9e8c
187938 info lifecycle [email protected]: [email protected]
187939 silly lifecycle [email protected]: no script for postinstall, continuing
187940 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingyeast-a096d536
187941 info lifecycle [email protected]: [email protected]
187942 silly lifecycle [email protected]: no script for postinstall, continuing
187943 silly postinstall engine.[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingengine.io-client-61fcb080
187944 info lifecycle engine.[email protected]: engine.[email protected]
187945 silly lifecycle engine.[email protected]: no script for postinstall, continuing
187946 silly postinstall socket.[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingsocket.io-client-64758957
187947 info lifecycle socket.[email protected]: socket.[email protected]
187948 silly lifecycle socket.[email protected]: no script for postinstall, continuing
187949 silly postinstall socket.[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingsocket.io-530792f2
187950 info lifecycle socket.[email protected]: socket.[email protected]
187951 silly lifecycle socket.[email protected]: no script for postinstall, continuing
187952 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingtestem-e398506e
187953 info lifecycle [email protected]: [email protected]
187954 silly lifecycle [email protected]: no script for postinstall, continuing
187955 silly postinstall @angular-cli/[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staging@angular-clibase-href-webpack-66cfc099
187956 info lifecycle @angular-cli/[email protected]: @angular-cli/[email protected]
187957 silly lifecycle @angular-cli/[email protected]: no script for postinstall, continuing
187958 silly postinstall @angular/[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staging@angularcommon-656b907f
187959 info lifecycle @angular/[email protected]: @angular/[email protected]
187960 silly lifecycle @angular/[email protected]: no script for postinstall, continuing
187961 silly postinstall @angular/[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staging@angularcompiler-eee12a4a
187962 info lifecycle @angular/[email protected]: @angular/[email protected]
187963 silly lifecycle @angular/[email protected]: no script for postinstall, continuing
187964 silly postinstall @angular/[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staging@angularcompiler-cli-2576bcb3
187965 info lifecycle @angular/[email protected]: @angular/[email protected]
187966 silly lifecycle @angular/[email protected]: no script for postinstall, continuing
187967 silly postinstall @angular/[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staging@angularcore-79de65ad
187968 info lifecycle @angular/[email protected]: @angular/[email protected]
187969 silly lifecycle @angular/[email protected]: no script for postinstall, continuing
187970 silly postinstall @angular/[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staging@angularplatform-browser-950be809
187971 info lifecycle @angular/[email protected]: @angular/[email protected]
187972 silly lifecycle @angular/[email protected]: no script for postinstall, continuing
187973 silly postinstall @angular/[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staging@angularplatform-server-2313b1ec
187974 info lifecycle @angular/[email protected]: @angular/[email protected]
187975 silly lifecycle @angular/[email protected]: no script for postinstall, continuing
187976 silly postinstall @ngtools/[email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staging@ngtoolswebpack-abbdde23
187977 info lifecycle @ngtools/[email protected]: @ngtools/[email protected]
187978 silly lifecycle @ngtools/[email protected]: no script for postinstall, continuing
187979 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingangular2-template-loader-f59bf38e
187980 info lifecycle [email protected]: [email protected]
187981 silly lifecycle [email protected]: no script for postinstall, continuing
187982 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingawesome-typescript-loader-ae718f1d
187983 info lifecycle [email protected]: [email protected]
187984 silly lifecycle [email protected]: no script for postinstall, continuing
187985 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingcommon-tags-59538a9b
187986 info lifecycle [email protected]: [email protected]
187987 silly lifecycle [email protected]: no script for postinstall, continuing
187988 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingcompression-webpack-plugin-3c2ab5ca
187989 info lifecycle [email protected]: [email protected]
187990 silly lifecycle [email protected]: no script for postinstall, continuing
187991 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingcss-loader-173337ae
187992 info lifecycle [email protected]: [email protected]
187993 silly lifecycle [email protected]: no script for postinstall, continuing
187994 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingember-cli-5f678b5d
187995 info lifecycle [email protected]: [email protected]
187996 silly lifecycle [email protected]: no script for postinstall, continuing
187997 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingexports-loader-1dc951e2
187998 info lifecycle [email protected]: [email protected]
187999 silly lifecycle [email protected]: no script for postinstall, continuing
188000 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingexpose-loader-f122e597
188001 info lifecycle [email protected]: [email protected]
188002 silly lifecycle [email protected]: no script for postinstall, continuing
188003 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingfile-loader-973ac2d0
188004 info lifecycle [email protected]: [email protected]
188005 silly lifecycle [email protected]: no script for postinstall, continuing
188006 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staginghtml-webpack-plugin-4879f630
188007 info lifecycle [email protected]: [email protected]
188008 silly lifecycle [email protected]: no script for postinstall, continuing
188009 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingistanbul-instrumenter-loader-1447bbf2
188010 info lifecycle [email protected]: [email protected]
188011 silly lifecycle [email protected]: no script for postinstall, continuing
188012 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingjson-loader-e5bbe23d
188013 info lifecycle [email protected]: [email protected]
188014 silly lifecycle [email protected]: no script for postinstall, continuing
188015 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingkarma-sourcemap-loader-d1d864cf
188016 info lifecycle [email protected]: [email protected]
188017 silly lifecycle [email protected]: no script for postinstall, continuing
188018 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingkarma-webpack-9b2f4d31
188019 info lifecycle [email protected]: [email protected]
188020 silly lifecycle [email protected]: no script for postinstall, continuing
188021 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingless-37f0df5c
188022 info lifecycle [email protected]: [email protected]
188023 silly lifecycle [email protected]: no script for postinstall, continuing
188024 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingless-loader-6cbe9318
188025 info lifecycle [email protected]: [email protected]
188026 silly lifecycle [email protected]: no script for postinstall, continuing
188027 silly postinstall [email protected] C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.stagingnode-sass-3fcd2f19
188028 info lifecycle [email protected]: [email protected]
188029 verbose lifecycle [email protected]: unsafe-perm in lifecycle true
188030 verbose lifecycle [email protected]: PATH: C:Usersmubusher_netaqAppDataRoamingnpmnode_modulesnpmbinnode-gyp-bin;C:Usersmubusher_netaqAppDataRoamingnpmnode_modulesangular-clinode_modulesnode-sassnode_modules.bin;C:Usersmubusher_netaqAppDataRoamingnpmnode_modulesangular-clinode_modules.bin;C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.bin;C:Usersmubusher_netaqAppDataRoamingnpm;C:Program Filesnodejs;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)Enterprise VaultEVClientx64;C:Usersmubusher_netaq.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program FilesMicrosoft SQL Server130ToolsBinn;;C:Program FilesGitcmd;C:Program Filesnodejs;C:Program Files (x86)Microsoft VS Codebin;C:Usersmubusher_netaqAppDataRoamingnpm
188031 verbose lifecycle [email protected]: CWD: C:Usersmubusher_netaqAppDataRoamingnpmnode_modulesangular-clinode_modulesnode-sass
188032 silly lifecycle [email protected]: Args: [ '/d /s /c', 'node scripts/build.js' ]
188033 silly lifecycle [email protected]: Returned: code: 1 signal: null
188034 info lifecycle [email protected]: Failed to exec postinstall script
188035 verbose unlock done using C:Usersmubusher_netaqAppDataRoamingnpm-cache_locksstaging-22966f5a5559d75b.lock for C:Usersmubusher_netaqAppDataRoamingnpmnode_modules.staging
188036 silly rollbackFailedOptional Starting
188037 silly rollbackFailedOptional Finishing
188038 silly runTopLevelLifecycles Finishing
188039 silly install printInstalled
188040 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modulesangular-clinode_moduleschokidarnode_modulesfsevents):
188041 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
188042 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
188042 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
188042 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
188042 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
188043 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modulesangular-clinode_modulesnode-zopfli):
188044 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-pre-gyp install --fallback-to-build
188044 warn optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY:
188045 verbose optional Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: Make sure you have the latest version of node.js and npm installed.
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: If you do, this is most likely a problem with the node-zopfli package,
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: not with npm itself.
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: Tell the author that this fails on your system:
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: node-pre-gyp install --fallback-to-build
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: You can get information on how to open an issue for this project with:
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: npm bugs node-zopfli
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: Or if that isn't available, you can get their info via:
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: npm owner ls node-zopfli
188045 verbose optional SKIPPING OPTIONAL DEPENDENCY: There is likely additional logging output above.
188046 verbose stack Error: [email protected] postinstall: node scripts/build.js
188046 verbose stack Exit status 1
188046 verbose stack at EventEmitter. (C:Usersmubusher_netaqAppDataRoamingnpmnode_modulesnpmlibutilslifecycle.js:255:16)
188046 verbose stack at emitTwo (events.js:87:13)
188046 verbose stack at EventEmitter.emit (events.js:172:7)
188046 verbose stack at ChildProcess. (C:Usersmubusher_netaqAppDataRoamingnpmnode_modulesnpmlibutilsspawn.js:40:14)
188046 verbose stack at emitTwo (events.js:87:13)
188046 verbose stack at ChildProcess.emit (events.js:172:7)
188046 verbose stack at maybeClose (internal/child_process.js:854:16)
188046 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
188047 verbose pkgid [email protected]
188048 verbose cwd C:stuff
188049 error Windows_NT 6.1.7601
188050 error argv "C:\Program Files\nodejs\node.exe" "C:\Users\mubusher_netaq\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "angular-cli@latest"
188051 error node v4.6.2
188052 error npm v3.10.9
188053 error code ELIFECYCLE
188054 error [email protected] postinstall: node scripts/build.js
188054 error Exit status 1
188055 error Failed at the [email protected] postinstall script 'node scripts/build.js'.
188055 error Make sure you have the latest version of node.js and npm installed.
188055 error If you do, this is most likely a problem with the node-sass package,
188055 error not with npm itself.
188055 error Tell the author that this fails on your system:
188055 error node scripts/build.js
188055 error You can get information on how to open an issue for this project with:
188055 error npm bugs node-sass
188055 error Or if that isn't available, you can get their info via:
188055 error npm owner ls node-sass
188055 error There is likely additional logging output above.
188056 verbose exit [ 1, true ]

Most helpful comment

I was able to get around this issue by adding the --unsafe-perm option (seems to be a requirement if running npm as root):-
npm install --unsafe-perm [email protected]

All 10 comments

It appears that node-sass 3.11.2 has just been released. From checking the logs my last successful build was installing node-sass 3.11.1 then all the builds started failing as soon as 3.11.2 was released. Even though I'm using a different framework (Ember JS) it seems to be the same issue. It throws the same error when doing npm install since node-sass 3.11.2 release.

Hi I am new to this npm,
I use windows 8, node version - 6.3.1, npm - 3.10.9
I am facing
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
})
can any one let me how can I resolve this issue? Thanks

how come the same thing successfully installed on another system (Windows 10 Enterprise).
very strange error.

I am also facing similar issue:
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"
})

@vivek4c4 @techunits you are both experiencing a warning that is perfectly normal and will not cause any issues for development. When using OS X there's a nice filesystem feature provided by the OS by which file changes emit events, making "watching" files for changes the reverse, where they're passively "listened" for (Change Detection vs an Event Emitter if you need an analogy).

This is made possible by fsevents, a package that is only available for OS X and macOS installations due to dependence on the OS's functionality. Windows and *nix will all see this warning. I haven't tested it, but the only non-proprietary OS that might have support would be the Darwin open source project.

I'm getting the same issue (error, not a warning - so cannot proceed):-

npm ERR! Linux 2.6.32-642.3.1.el6.x86_64
npm ERR! argv "/opt/node-v6.9.1-linux-x64/bin/node" "/usr/bin/npm" "--loglevel" "verbose" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `node scripts/build.js`

I was able to get around this issue by adding the --unsafe-perm option (seems to be a requirement if running npm as root):-
npm install --unsafe-perm [email protected]

Hi Guys,

after spending too much time on this issue, finally i reach to this conclusion,

some of the amazon cloud server is blocked by the network. which is started from something like s3.amazon.etc etc

i request to network admin and he gave access now it works for me.

@MUBUSHER glad to hear you got it sorted. Meanwhile, the source of this issue is being tracked in https://github.com/angular/angular-cli/issues/3070.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings