artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
7.95k stars 507 forks source link

Not Installing Due to PostInstall Fail #548

Open agnibha92 opened 6 years ago

agnibha92 commented 6 years ago

Was trying to install Artillery but the installation is getting failed due to some post-install failure. Logs of the same are below,

7529 verbose lifecycle jsonpath@1.0.0~postinstall: CWD: /usr/lib/node_modules/artillery/node_modules/jsonpath
7530 silly lifecycle jsonpath@1.0.0~postinstall: Args: [ '-c', 'node lib/aesprim.js > generated/aesprim-browser.js' ]
7531 silly lifecycle jsonpath@1.0.0~postinstall: Returned: code: 2  signal: null
7532 info lifecycle jsonpath@1.0.0~postinstall: Failed to exec postinstall script
7533 timing action:postinstall Completed in 110ms
7534 verbose unlock done using /home/agnibha/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
7535 timing stage:rollbackFailedOptional Completed in 375ms
7536 timing stage:runTopLevelLifecycles Completed in 6378ms
7537 verbose stack Error: jsonpath@1.0.0 postinstall: `node lib/aesprim.js > generated/aesprim-browser.js`
7537 verbose stack Exit status 2
7537 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
7537 verbose stack     at emitTwo (events.js:126:13)
7537 verbose stack     at EventEmitter.emit (events.js:214:7)
7537 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
7537 verbose stack     at emitTwo (events.js:126:13)
7537 verbose stack     at ChildProcess.emit (events.js:214:7)
7537 verbose stack     at maybeClose (internal/child_process.js:925:16)
7537 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
7538 verbose pkgid jsonpath@1.0.0
7539 verbose cwd /home/agnibha/Documents
7540 verbose Linux 4.4.0-134-generic
7541 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "artillery"
7542 verbose node v8.11.4
7543 verbose npm  v6.4.0
7544 error code ELIFECYCLE

System Information

KeeganJ commented 6 years ago

Just had the same error pop up on our docker build with the latest version of artillery. I was able to mitigate the issue by adding a --unsafe-perm=true flag to our install command.

I found this thread very helpful.

audetvincent commented 5 years ago

I've had this too, and instead of using --unsafe-perm=true, which is not a good practice, I used --ignore-scripts.