videojs-hls-quality-selector icon indicating copy to clipboard operation
videojs-hls-quality-selector copied to clipboard

v1.1.2 Does not work - no such file or directory, open './package-lock.json'

Open DispatchCommit opened this issue 4 years ago • 1 comments

The latest release has a pre-install script that does not work.

> [email protected] preinstall D:\bitwave\node_modules\videojs-hls-quality-selector
> npx npm-force-resolutions

npx: installed 5 in 1.883s
ENOENT: no such file or directory, open './package-lock.json'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: `npx npm-force-resolutions`
npm ERR! Exit status 1

And therefore v1.1.2 released yesterday fails to install and breaks our builds.

DispatchCommit avatar Sep 04 '20 13:09 DispatchCommit

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

angelogiuseppe avatar Jul 24 '21 22:07 angelogiuseppe