twilio-cli 2.32.0 breaks npm install
thomaschaaf opened this issue · 8 comments
Issue Summary
The preinstall script breaks installing.
Code Snippet
Broken:
FROM amazon/aws-sam-cli-build-image-nodejs14.x
RUN npm install -g --no-optional twilio-cli@2.32.0
Working:
FROM amazon/aws-sam-cli-build-image-nodejs14.x
RUN npm install -g --no-optional twilio-cli@2.31.0
Exception/Log
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /var/lang/lib/node_modules/twilio-cli/node_modules/@babel/compat-data
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/var/lang/lib/node_modules/twilio-cli/node_modules/@babel/compat-data'
npm ERR! [Error: EACCES: permission denied, access '/var/lang/lib/node_modules/twilio-cli/node_modules/@babel/compat-data'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/var/lang/lib/node_modules/twilio-cli/node_modules/@babel/compat-data'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! code ELIFECYCLE
npm ERR! errno 243
npm ERR! twilio-cli@2.32.0 preinstall: `npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions`
npm ERR! Exit status 243
npm ERR!
npm ERR! Failed at the twilio-cli@2.32.0 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-10-19T08_25_03_870Z-debug.log
Hi @thomaschaaf, Can you paste the full logs here?
I'm having the same issue. Been trying to debug this for hours:
3682 error Error: ENOENT: no such file or directory, open './package-lock.json'
3682 error at Object.openSync (node:fs:585:3)
3682 error at Object.fs [as readFileSync] (node:fs:453:35)
3682 error at npm_force_resolutions$core$node_slurp (/root/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:15:20)
3682 error at npm_force_resolutions$core$read_json (/root/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:22:23)
3682 error at switch__2144__auto__ (/root/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:151:3)
3682 error at /root/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:151:3
3682 error at npm_force_resolutions$core$update_package_lock_$_state_machine__2145__auto____1 (/root/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.js:648:4)
3682 error at cljs.core.async.impl.ioc-helpers/FN-IDX (/root/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.js:664:88)
3682 error at cljs.core.async.impl.ioc-helpers/run-state-machine (/root/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/cljs/core/async/impl/ioc_helpers.cljs:35:23)
3682 error at cljs$core$async$impl$ioc_helpers$run_state_machine_wrapped (/root/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/cljs/core/async/impl/ioc_helpers.cljs:39:6)
3683 verbose exit 1
I've even tried to force it to use the older version of twilio-cli, but it still tries to install this new one. Even when my package-lock.json
and package.json
BOTH point to v2.31
Upgrading to node 16 is currently not possible for us as it's not yet lts.
Hi @basperheim @thomaschaaf Is it possible to get the full log file? It would help us a lot with the analysis to narrow a few things down
See above for the dockerfile. Then you can replicate it yourself 🙂
We are investigating this currently.
We have deprecated 2.32.0 and released 2.32.1. This should resolve the issues
Thank you!