Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

postinstall.sh prevents install on Windows #43

Closed
drthingums opened this Issue · 7 comments

4 participants

@drthingums

When I tried to install blade using node, I got this error message (with cmd and MSYS bash):

> ./postinstall.sh

'.' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! blade@1.4.1 postinstall: `./postinstall.sh`
npm ERR! `cmd "/c" "./postinstall.sh"` failed with 1
npm ERR!
npm ERR! Failed at the blade@1.4.1 postinstall script.
npm ERR! This is most likely a problem with the blade package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./postinstall.sh
npm ERR! You can get their info via:
npm ERR!     npm owner ls blade
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.0.6002
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "blade"
npm ERR! cwd c:\Program Files\nodejs
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.24
npm ERR! code ELIFECYCLE
npm ERR! message blade@1.4.1 postinstall: `./postinstall.sh`
npm ERR! message `cmd "/c" "./postinstall.sh"` failed with 1
npm ERR! errno {}

npm ERR! Error: EPERM, open 'c:\Program Files\nodejs\npm-debug.log'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Windows_NT 6.0.6002
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "blade"
npm ERR! cwd c:\Program Files\nodejs
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.24
npm ERR! path c:\Program Files\nodejs\npm-debug.log
npm ERR! code EPERM
npm ERR! message EPERM, open 'c:\Program Files\nodejs\npm-debug.log'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     c:\Program Files\nodejs\npm-debug.log
npm not ok
npm not ok

I had to open up the .tgz archive that npm downloaded and remove the postinstall script hook before it would install blade.

@bminer
Owner

Yep. This needs to be fixed. Thanks for the bug report. Any ideas for how to fix this? I don't know much about Windows and NPM.

@drthingums

Use a Javascript postinstall script instead maybe?

@crapthings

or make a batch file like postinstall.bat ?

@bminer bminer closed this issue from a commit
@bminer Replaced bash postinstall script with a JavaScript one (fixes #43)
Replaced all path.exists references with fs.exists for Node 0.8 compatibility
Push to 1.4.2
2f4ce9f
@bminer bminer closed this in 2f4ce9f
@bminer
Owner

This has now been fixed!

@crapthings

can't update ?

Zhangs-MacBook-Pro:jobboard crapthings$ sudo npm update -g blade
Password:
npm http GET https://registry.npmjs.org/blade
npm http 200 https://registry.npmjs.org/blade
npm http GET https://registry.npmjs.org/blade/-/blade-1.4.2.tgz
npm http GET https://registry.npmjs.org/blade/1.4.2
npm http 200 https://registry.npmjs.org/blade/1.4.2
npm http GET https://registry.npmjs.org/blade/-/blade-1.4.2.tgz
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/uglify-js
npm http 200 https://registry.npmjs.org/commander
/usr/local/bin/blade -> /usr/local/lib/node_modules/blade/bin/blade

blade@1.4.1 postinstall /usr/local/lib/node_modules/blade
./postinstall.sh

sh: ./postinstall.sh: No such file or directory
npm ERR! blade@1.4.1 postinstall: ./postinstall.sh
npm ERR! sh "-c" "./postinstall.sh" failed with 127
npm ERR!
npm ERR! Failed at the blade@1.4.1 postinstall script.
npm ERR! This is most likely a problem with the blade package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./postinstall.sh
npm ERR! You can get their info via:
npm ERR! npm owner ls blade
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "update" "-g" "blade"
npm ERR! cwd /Users/crapthings/Desktop/jobboard
npm ERR! node -v v0.8.0
npm ERR! npm -v 1.1.32
npm ERR! code ELIFECYCLE
npm ERR! message blade@1.4.1 postinstall: ./postinstall.sh
npm ERR! message sh "-c" "./postinstall.sh" failed with 127
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/crapthings/Desktop/jobboard/npm-debug.log
npm ERR! not ok code 0
Zhangs-MacBook-Pro:jobboard crapthings$

@crapthings

reinstall it again. working.

@calbertts

Execute the installation command two times. Work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.