walterra / d3-milestones

A d3 based timeline visualization.
https://walterra.github.io/d3-milestones
Other
146 stars 27 forks source link

npm install failing at preinstall step #27

Closed AkshayPeshave closed 3 years ago

AkshayPeshave commented 3 years ago
project_dir$ npm -v
6.14.10

project_dir$ npm install d3-milestones

> d3-milestones@1.0.0 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/next-sass@1.0.1 requires a peer of node-sass@^4.7.2 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@6.0.6 requires a peer of node-sass@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.19.1 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: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules/webpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules/react-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/next/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! d3-milestones@1.0.0 preinstall: `npx npm-force-resolutions`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the d3-milestones@1.0.0 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
walterra commented 3 years ago

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

walterra commented 3 years ago

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: https://github.com/rogeriochaves/npm-force-resolutions/issues/12

AkshayPeshave commented 3 years ago

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 commented 3 years ago

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.