Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install failing at preinstall step #27

Closed
AkshayPeshave opened this issue Jan 16, 2021 · 4 comments
Closed

npm install failing at preinstall step #27

AkshayPeshave opened this issue Jan 16, 2021 · 4 comments
Assignees
Labels

Comments

@AkshayPeshave
Copy link

project_dir$ npm -v
6.14.10

project_dir$ npm install d3-milestones

> [email protected] preinstall /home/axxe/Documents/Git_Repositories/MySite/nextjs/node_modules/d3-milestones
> npx npm-force-resolutions

npx: installed 5 in 1.323s
ENOENT: no such file or directory, open './package-lock.json'
npm WARN @zeit/[email protected] requires a peer of node-sass@^4.7.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-sass@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/react-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/next/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: `npx npm-force-resolutions`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@walterra
Copy link
Owner

Thanks for reporting this. This relates to a corresponding issue with npm-force-resolutions here rogeriochaves/npm-force-resolutions#10 - I'll see if I can come up with a workaround.

@walterra
Copy link
Owner

This seems to be the real issue: package-lock.json doesn't get published to npm, that's why the preinstall script will not find it: rogeriochaves/npm-force-resolutions#12

@AkshayPeshave
Copy link
Author

AkshayPeshave commented Jan 17, 2021

I can confirm that install breaks and package-lock.json isn't generated when I include d3-milestones in package.json. Installation completes when I disable scripts (npm install --ignore-scripts) since it disables the preinstall script. Packages won't work as expected though since some scripts are needed. But this may help zero-in on the root cause in code.

@walterra
Copy link
Owner

I updated the build setup to no longer make use of npm-force-resolutions, it caused too much trouble with that preinstall issue. Just released v1.0.1 which should install without the error.

@walterra walterra self-assigned this Jan 18, 2021
@walterra walterra added the bug label Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants