Error: ENOENT: no such file or directory, open './package-lock.json'
fredericrous opened this issue · comments
Frederic R. commented
Edgar Arroyo commented
you can try
"preinstall": "npx npm-force-resolutions || echo 1",
as a workaround and I would work.
Maximilian Franzke commented
most likely a duplicate to #10
Angelo Giuseppe commented
To anyone experiencing this issue, feel free to try: https://www.npmjs.com/package/force-resolutions
Just change:
"preinstall": "npx npm-force-resolutions"
To:
"preinstall": "npx force-resolutions"
npx force-resolutions does not run when no package-lock.json is detected, and allows the next command inline to be executed as normal. This is useful when installing dependencies for a package that has been already published where package-lock.json is not available.
Feedback and PR's are welcome