npm error: `lock-verify` throws an error on CI when running `npm ci`

62 Views Asked by At

Locally, both npm install and npm ci runs successfully. However, on CI , npm ci breaks with the error npm ERR! Cannot read property '@babel/runtime' of undefined. When I check the logs, it points to an error with lock-verify, even though on npmjs.com it presents lock-verify as deprecated for npm v7 onwards, and I'm using npm 9.3.1. When running lock-verify locally, I get the same error as the one on CI:

npx lock-verify
TypeError: Cannot read properties of undefined (reading '@babel/runtime')
    at /Users/aprilgoncalves/workspace/excelsior/frontend/node_modules/lock-verify/index.js:27:40
    at Array.forEach (<anonymous>)
    at /Users/aprilgoncalves/workspace/excelsior/frontend/node_modules/lock-verify/index.js:25:25

I have re-generated package-lock.json may times, and it doesn't seem to fix this issue. Any thoughts on how to solve this issue?

0

There are 0 best solutions below