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 [email protected]~postinstall: CWD: /usr/lib/node_modules/artillery/node_modules/jsonpath
7530 silly lifecycle [email protected]~postinstall: Args: [ '-c', 'node lib/aesprim.js > generated/aesprim-browser.js' ]
7531 silly lifecycle [email protected]~postinstall: Returned: code: 2 signal: null
7532 info lifecycle [email protected]~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: [email protected] 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 [email protected]
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
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've had this too, and instead of using --unsafe-perm=true, which is not a good practice, I used --ignore-scripts.
Most helpful comment
I've had this too, and instead of using --unsafe-perm=true, which is not a good practice, I used --ignore-scripts.