Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Error on npm install #465

Closed
iamontheinet opened this issue Sep 15, 2015 · 18 comments
Closed

Error on npm install #465

iamontheinet opened this issue Sep 15, 2015 · 18 comments

Comments

@iamontheinet
Copy link

Hi,

I am getting the following error when running npm install.

My env:

  • Mac OS X 10.10.5
  • Node.js 0.12.x and 0.10.x
  • ruby 2.0.0p481
  • bundler 1.10.6

[email protected] postinstall /Users/iamontheinet/Zurb/fd
bower install && grunt build

sh: bower: command not found

npm ERR! [email protected] postinstall: bower install && grunt build
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the foundationpress package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install && grunt build
npm ERR! You can get their info via:
npm ERR! npm owner ls foundationpress
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 14.5.0
npm ERR! command "/Users/iamontheinet/.nvm/v0.10.40/bin/node" "/Users/iamontheinet/.nvm/v0.10.40/bin/npm" "install"
npm ERR! cwd /Users/iamontheinet/Zurb/fd
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/iamontheinet/Zurb/fd/npm-debug.log

npm ERR! not ok code 0

Here's the verbose tail of npm-debug.log:

30 info [email protected] Failed to exec postinstall script
31 error [email protected] postinstall: bower install && grunt build
31 error Exit status 127
32 error Failed at the [email protected] postinstall script.
32 error This is most likely a problem with the foundationpress package,
32 error not with npm itself.
32 error Tell the author that this fails on your system:
32 error bower install && grunt build
32 error You can get their info via:
32 error npm owner ls foundationpress
32 error There is likely additional logging output above.
33 error System Darwin 14.5.0
34 error command "/Users/iamontheinet/.nvm/v0.10.40/bin/node" "/Users/iamontheinet/.nvm/v0.10.40/bin/npm" "install"
35 error cwd /Users/iamontheinet/Zurb/fd-stratio
36 error node -v v0.10.40
37 error npm -v 1.4.28
38 error code ELIFECYCLE
#39 verbose exit [ 1, true ]

Any help will be appreciated. Thanks in advance!

@olefredrik
Copy link
Owner

Hi, I know there have been some compability issues with the latest version of Node. See this thread for suggested fix #461. Please let me know if this works for you.

@iamontheinet
Copy link
Author

I tried Node.js 0.12.5 and got the same error:

[email protected] postinstall /Users/iamontheinet/Zurb/fd
bower install && grunt build

sh: bower: command not found

npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/iamontheinet/.nvm/versions/node/v0.12.5/bin/node" "/Users/iamontheinet/.nvm/versions/node/v0.12.5/bin/npm" "install"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] postinstall: bower install && grunt build
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'bower install && grunt build'.
npm ERR! This is most likely a problem with the foundationpress package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install && grunt build
npm ERR! You can get their info via:
npm ERR! npm owner ls foundationpress
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/iamontheinet/Zurb/fd-stratio/npm-debug.log

@olefredrik
Copy link
Owner

Did you clone the most recent version of FP? I just tested npm install using node v.0.12.0 and npm 2.5.1 on my Mac OSX 10.10.5. Got no errors.

@iamontheinet
Copy link
Author

Yes, it is a fresh clone as of yesterday. I'll try it again.

Note that our Node.js and npm versions are different. Not sure if that matters.

@olefredrik
Copy link
Owner

A temporary solution may be to remove the postscripts from package.json https://github.com/olefredrik/FoundationPress/blob/master/package.json#L28 . Then you are bound to have bower and grunt installed locally and manually run bower install && grunt build after npm install. Anyway, it would be nice to get to the bottom of why this fails.

@iamontheinet
Copy link
Author

Got it. I will keep you posted on how it goes. Thanks!

@iamontheinet
Copy link
Author

Update: starting fresh with a new clone resolved npm install issue (not exactly sure how or why) but then I got stuck on npm run build. Note: I've tried switching to Node.js 0.10.x

file to import not found or unreadable: ../components/foundation/scss/normalize
Current dir: /Users/iamontheinet/Zurb/FoundationPress/assets/scss/
Line 4 Column 9 assets/scss/foundation.scss
Warning: Use --force to continue.

Aborted due to warnings.

npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/iamontheinet/.nvm/versions/node/v0.12.5/bin/node" "/Users/iamontheinet/.nvm/versions/node/v0.12.5/bin/npm" "run" "build"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: grunt build
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the [email protected] build script 'grunt build'.
npm ERR! This is most likely a problem with the foundationpress package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! grunt build
npm ERR! You can get their info via:
npm ERR! npm owner ls foundationpress

@olefredrik
Copy link
Owner

That's kind of weird. Because the normalize.scss should be generated on npm install and be placed under assets/components/foundation/normalize.scss. As long as this file is present, the import statement in foundation.scss have no reason to fail.

What if you remove the components folder completely and do another npm install. Will that work? Do you see the normalize.scss file there at all?


[email protected] build /Users/olelie/MAMP/htdocs/FoundationPress/source/wp-content/themes/FoundationPress
grunt build

Running "copy:scripts" (copy) task
Created 1 directories, copied 5 files

Running "copy:iconfonts" (copy) task
Created 1 directories, copied 6 files

Running "string-replace:fontawesome" (string-replace) task

Running "sass:dist" (sass) task

Running "concat:dist" (concat) task
File "assets/javascript/foundation.js" created.

Running "uglify:dist" (uglify) task
File "assets/javascript/foundation.js" created.

Done, without errors.

@iamontheinet
Copy link
Author

It turned out to be permission issue on ~/.config/configstore/bower-github.yml file. After I changed its owner to my user, npm install and npm run build both worked without throwing any errors. Thanks! [Closing the issue.]

I have a question though, if you don't mind: how do I add FoundationPress to an existing Wordpress site? I am assuming https://wordpress.org/plugins/foundationpress/installation/ is not it since it has not been updated.

@roborracle
Copy link

I've run in to the same error

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v4.1.0
npm ERR! npm  v2.14.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `grunt build`
npm ERR! Exit status 3
npm ERR! 
npm ERR! Failed at the [email protected] build script 'grunt build'.
npm ERR! This is most likely a problem with the foundationpress package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     grunt build
npm ERR! You can get their info via:
npm ERR!     npm owner ls foundationpress
npm ERR! There is likely additional logging output above.

Here is the log generated:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild [email protected]
6 info build [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec build script
9 verbose stack Error: [email protected] build: `grunt build`
9 verbose stack Exit status 3
9 verbose stack     at EventEmitter.<anonymous>              (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous>     (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:817:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd /Users/my/path/to/wp/wp-content/themes/pec_f5
12 error Darwin 14.5.0
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
14 error node v4.1.0
15 error npm  v2.14.3
16 error code ELIFECYCLE
17 error [email protected] build: `grunt build`
17 error Exit status 3
18 error Failed at the [email protected] build script 'grunt build'.
18 error This is most likely a problem with the foundationpress package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     grunt build
18 error You can get their info via:
18 error     npm owner ls foundationpress
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

I could really use some help here. ff this is a permissions issue, please let me know where and what needs to be adjusted, or if this is a node.js/npm issue, can you please point me to a resource roll back the version I'm using (node 4.1.0 - npm 2.14.3).

Thanks in advance, and thanks for going to all this work to make Foundation and WP work together

@olefredrik
Copy link
Owner

Hi @roborracle ,

I made a workaround guide which can be found here #475

@oksodavid
Copy link

Hi @olefredrik ,
Can you help? I just followed #475

npm WARN deprecated [email protected]: use node-gyp@3+, it does all the things
\

[email protected] install /Users/david/Sites/oksofoundation/wp-content/themes/oksofp5/node_modules/node-sass
node scripts/install.js

Cannot download "https://github.com/sass/node-sass/releases/download/v3.2.0/darwin-ia32-14_binding.node": HTTP error 404 Not Found

[email protected] postinstall /Users/david/Sites/oksofoundation/wp-content/themes/oksofp5/node_modules/node-sass
node scripts/build.js

Building: /Users/david/.nvm/versions/node/v0.12.5/bin/node node_modules/pangyp/bin/node-gyp rebuild --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
CXX(target) Release/obj.target/libsass/src/libsass/ast.o
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-stdlib=libc++"
make: *** [Release/obj.target/libsass/src/libsass/ast.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/david/Sites/oksofoundation/wp-content/themes/oksofp5/node_modules/node-sass/node_modules/pangyp/lib/build.js:272:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 10.8.0
gyp ERR! command "/Users/david/.nvm/versions/node/v0.12.5/bin/node" "/Users/david/Sites/oksofoundation/wp-content/themes/oksofp5/node_modules/node-sass/node_modules/pangyp/bin/node-gyp" "rebuild" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/david/Sites/oksofoundation/wp-content/themes/oksofp5/node_modules/node-sass
gyp ERR! node -v v0.12.5
gyp ERR! pangyp -v v2.3.2
gyp ERR! not ok
Build failed
npm ERR! Darwin 10.8.0
npm ERR! argv "/Users/david/.nvm/versions/node/v0.12.5/bin/node" "/Users/david/.nvm/versions/node/v0.12.5/bin/npm" "install"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE

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 'node scripts/build.js'.
npm ERR! 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 their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.

@roborracle
Copy link

@olefredrik - that solution worked - thanks again!

@sugandhgoyal
Copy link

sugandhgoyal commented May 4, 2017

I getting the same error on npm start . What should I do to resolve it ? node version- v6.9.5.
error-
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prestart: babel-node buildScripts/startMessage.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prestart script 'babel-node buildScripts/startMessage.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 javascript-development-environment package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node buildScripts/startMessage.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs javascript-development-environment
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls javascript-development-environment
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! G:\Pluralsight-JsDevEnv\npm-debug.log

The npm-debug.log file is created with the same errors.

@sugandhgoyal
Copy link

Debug-log file contains the following.
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 verbose lifecycle [email protected]
prestart: unsafe-perm in lifecycle true
7 verbose lifecycle [email protected]prestart: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;G:\Pluralsight-JsDevEnv\node_modules.bin;C:\Program Files\Java\jdk1.8.0_101\bin;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Sony\VAIO Improvement;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\Skype\Phone;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Users\ATUL\Git\cmd;C:\Users\ATUL\AppData\Local\Microsoft\WindowsApps;C:\Users\ATUL\AppData\Roaming\npm;C:\Users\ATUL\AppData\Local\Yarn.bin;C:\Program Files (x86)\Microsoft VS Code\bin
8 verbose lifecycle [email protected]
prestart: CWD: G:\Pluralsight-JsDevEnv
9 silly lifecycle [email protected]prestart: Args: [ '/d /s /c', 'babel-node buildScripts/startMessage.js' ]
10 silly lifecycle [email protected]
prestart: Returned: code: 1 signal: null
11 info lifecycle [email protected]~prestart: Failed to exec prestart script
12 verbose stack Error: [email protected] prestart: babel-node buildScripts/startMessage.js
12 verbose stack Exit status 1
12 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at EventEmitter.emit (events.js:191:7)
12 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at ChildProcess.emit (events.js:191:7)
12 verbose stack at maybeClose (internal/child_process.js:877:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
13 verbose pkgid [email protected]
14 verbose cwd G:\Pluralsight-JsDevEnv
15 error Windows_NT 10.0.14393
16 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
17 error node v6.9.5
18 error npm v3.10.10
19 error code ELIFECYCLE
20 error [email protected] prestart: babel-node buildScripts/startMessage.js
20 error Exit status 1
21 error Failed at the [email protected] prestart script 'babel-node buildScripts/startMessage.js'.
21 error Make sure you have the latest version of node.js and npm installed.
21 error If you do, this is most likely a problem with the javascript-development-environment package,
21 error not with npm itself.
21 error Tell the author that this fails on your system:
21 error babel-node buildScripts/startMessage.js
21 error You can get information on how to open an issue for this project with:
21 error npm bugs javascript-development-environment
21 error Or if that isn't available, you can get their info via:
21 error npm owner ls javascript-development-environment
21 error There is likely additional logging output above.
22 verbose exit [ 1, true ]

@Abudl-Majid
Copy link

I am having the following issue, looking for some help
C:\Users\asus>npm install -g bower.
npm ERR! code E404
npm ERR! 404 Not Found: bower.@latest

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\asus\AppData\Roaming\npm-cache_logs\2017-06-13T07_08_10_034Z-debug.log

C:\Users\asus>

@linuxbastard
Copy link
Contributor

Can you view this in your browser? http://registry.npmjs.org/express

Check npm install -g bower -- <title>404 Not Found</title>

@hajarrhechchou
Copy link

help me!
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\hajar\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 info lifecycle [email protected]
start: [email protected]
7 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
start: PATH: C:\Users\hajar\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\hajar\Desktop\vsc\veille\app2\node_modules.bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.4;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Users\hajar\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\hajar\Desktop\vsc\veille\app2\node_modules.bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.4;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\sts-bundle\sts-3.8.4.RELEASE;C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.4;C:\Program Files\MongoDB\Server\3.4\bin;C:\Users\hajar\AppData\Roaming\npm;C:\Program Files\nodejs;C:\Users\hajar\Desktop\vsc\veille\app2\node_modules
9 verbose lifecycle [email protected]start: CWD: C:\Users\hajar\Desktop\vsc\veille\app2
10 silly lifecycle [email protected]
start: Args: [ '/d /s /c', 'tsc && concurrently "tsc -w" "lite-server" ' ]
11 silly lifecycle [email protected]start: Returned: code: 2 signal: null
12 info lifecycle [email protected]
start: Failed to exec start script
13 verbose stack Error: [email protected] start: tsc && concurrently "tsc -w" "lite-server"
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (C:\Users\hajar\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:289:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at EventEmitter.emit (events.js:191:7)
13 verbose stack at ChildProcess. (C:\Users\hajar\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:891:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\hajar\Desktop\vsc\veille\app2
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\hajar\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v6.11.1
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 2
22 error [email protected] start: tsc && concurrently "tsc -w" "lite-server"
22 error Exit status 2
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants