Closed g-bastianelli closed 3 years ago
Same here, at first had an ES-Lint issue regarding this on GitHub, removed node-modules and tried to re-install, but facing the same error. Using Node v12.16.1 , NPM v6.13.4
same here, suddenly my github eslint giving me this issue on PR, i tried npm install in my local code. Then I get this same issue in local as well.
We were able to resolve the issue by updating all of the items in "resolutions" within our packages.json. For us, we updated to the following and the problem went away. Can't specify this is a correct or valid fix, but it has resolved the issue for us :)
Original: "resolutions": { "https-proxy-agent": "2.2.4", "node-sass": "^4.13.1", "serialize-javascript": "^2.1.1", "tree-kill": "1.2.2" }
Updated: "resolutions": { "https-proxy-agent": "5.0.0", "node-sass": "5.0.0", "serialize-javascript": "5.0.1", "tree-kill": "1.2.2" }
I hope this helps!
Same happened here since the latest version was published. Thanks for sharing the workaround
One can also use "npx npm-force-resolutions@0.0.6"
to pin the used version in the "scripts"
-> "preinstall"
part.
One can also use
"npx npm-force-resolutions@0.0.6"
to pin the used version in the"scripts"
->"preinstall"
part.
Wasn't working for me
I think that it's a matter of type. When we use ^ version handle as an object i guess and without as a string.
I think it's an issue with the latest version (0.0.7). In my project, I did a downgrade and it worked nicely.
"preinstall": "npx npm-force-resolutions@0.0.6"
looks like its related with this commit : https://github.com/rogeriochaves/npm-force-resolutions/commit/986fb7c7068d963963b80cbdc046dbecf9669e42
my guessing : function is looking to the integrity hash in the dependencies. On some dependencies (had the problem with graceful-fs), this hash is empty and the method couldn't find sha-1 or base64 hash : crash.
I think it's an issue with the latest version (0.0.7). In my project, I did a downgrade and it worked nicely.
"preinstall": "npx npm-force-resolutions@0.0.6"
I will be doing this going forward after multiple issues this week.
One can also use
"npx npm-force-resolutions@0.0.6"
to pin the used version in the"scripts"
->"preinstall"
part.
Don't you love pinning the version of the version-pinner ^_^
You broke it AGAIN in the same week. lol. You guys need a better QA procedure.
Thank you! 😄
This bug triggered an improvement in our code by stop using npm-force-resolutions
and fixing the actual problem! 😉
well, what can I say, sorry to be honest folks, I didn't even knew that ^ versions were supported, because I never really used like that, that's why I didn't have a unit test for it, it was working by accident so far
turns out npm is quite a complicated thing, when trying to fix other issues where integrity was not fetched properly, I end up breaking this one, because npm api does not support urls like https://registry.npmjs.org/hoek/^4.2.1
, so I reversed to the old behaviour of not having integrity checks if version has ^ in it
should be fixed by 5734f5c98f37d9e55f6c1a74b17f2faece8724bc, and now released on v0.0.9
, please let me know of any further issues
@danizep that's a great outcome! 😃
~
doesn't seem to work. I stopped using ^
in favor of ~
in the rare event a package-lock.json
needs to be regenerated as patch variations have less chance to break things.
@kalbert312 I will follow up on #29
@rogeriochaves don't beat yourself up. Your work is saving us a lot of trouble and I am thankful for that. It's great the the community quickly found a workaround to this small hiccup and now there there is test coverage.
Keep up the good work :)
Hello. Its what i havsince your release.
it's happening on my CI too. Node14 and npm 7