Closed EtharAlali closed 9 years ago
Hi,
Got a Weird Error when running
npm install -g caniuse-api
The install appears to go OK until it runs postinstall where it results in:
npm http 200 https://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.2.tgz > caniuse-api@1.3.0 postinstall C:\[REMOVED]\src\node_modules\caniuse-api > node -e "require('shelljs/global');if(test('-d', 'dist'))exec('node dist/generate-features.js')" [eval]:1 "require('shelljs/global');if(test('-d', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Unexpected token ILLEGAL at Object.<anonymous> ([eval]-wrapper:6:22) at Module._compile (module.js:456:26) at evalScript (node.js:532:25) at startup (node.js:80:7) at node.js:901:3 unbuild caniuse-api@1.3.0 npm ERR! weird error 8 npm ERR! not ok code 0
Hence the weird error :)
The funny thing is this runs fine within node itself. For example running the command straight from the command line works without any issue:
C:\[REMOVED]\src> node -e "require('shelljs/global');if(test('-d', 'dist'))exec('node dist/generate-features.js')"
I've included the relative position in the current working directory so you can see where I am running 'npm install' from.
Any help would be appreciated.
node + npm version please.
Good call!
A bit behind the times:
node v0.10.13 npm 1.3.2
So I updated both to
node v0.12.7 npm 2.11.3
and it works. Thanks. Closing.
Hi,
Got a Weird Error when running
The install appears to go OK until it runs postinstall where it results in:
Hence the weird error :)
The funny thing is this runs fine within node itself. For example running the command straight from the command line works without any issue:
I've included the relative position in the current working directory so you can see where I am running 'npm install' from.
Any help would be appreciated.