I'm trying to run this command:
npm ci
And it returns this error:
npm ERR! pkg-dir not accessible from find-cache-dir
What am I missing here?
I'm trying to run this command:
npm ci
And it returns this error:
npm ERR! pkg-dir not accessible from find-cache-dir
What am I missing here?
So it turned out that my package-lock.json
file was out of sync with package.json
. I ran npm i
, which regenerated an in-sync version of package-lock.json
, which I eventually used in other environments to successfully run npm ci
command.
Just running npm i
again didn't fix the issue for me. Deleting my existing package-lock.json
and my node_modules
folder, then running npm i
generated an updated package-lock.json
file. Afterwards, npm ci
worked.
Problem is with compatibility between versions of Node and NPM, in my case upgrading NPM to 8.5.5 and Node to 18.12.1 worked