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 version shipped with node 10.7.0 yelds its not compatible with node 10.7.0 #21885

Closed
trygve-lie opened this issue Jul 19, 2018 · 20 comments
Closed
Labels
npm Issues and PRs related to the npm client dependency or the npm registry.

Comments

@trygve-lie
Copy link

Clean install of node 10.7.0 on Ubuntu. When running npm install in any module the following is yeld:

WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.r /home/trygve/Dev/ttl-mem-cache
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
npm[2247]: ../src/node_zlib.cc:436:static void node::{anonymous}::ZCtx::Init(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
 1: 0x5625547ab8c0 node::Abort() [npm]
 2: 0x5625547ab9b8  [npm]
 3: 0x562554851656  [npm]
 4: 0x562554a692a9  [npm]
 5: 0x562554a6a234 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [npm]
 6: 0xfde019841bd 
Aborted (core dumped)

npm --version yelds 6.1.0, which are the npm version bundeled with node 10.7.0.

The result is that nothing is installed.

@vsemozhetbyt vsemozhetbyt added the npm Issues and PRs related to the npm client dependency or the npm registry. label Jul 19, 2018
@bricss
Copy link

bricss commented Jul 19, 2018

Can't confirm anything like this on Win10 x64 machine.

@addaleax
Copy link
Member

I can’t reproduce this on Ubuntu, either. When you say “clean install”, what exactly does that mean? That if you remove npm’s directory and re-install it, that doesn’t help?

@jarruda
Copy link

jarruda commented Sep 6, 2018

I'm getting this on Win10 x64.

PS E:\src\electron-quick-start> npm -v
6.2.0
PS E:\src\electron-quick-start> node -v
v10.9.0
PS E:\src\electron-quick-start> npm install

WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.aging-c11e
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
npm[10152]: src\node_zlib.cc:436: Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
 1: 00007FF788A53D05
 2: 00007FF788A2DD46
 3: 00007FF788A2DE11
 4: 00007FF7889A03AC
 5: 00007FF788E12AA2
 6: 00007FF788E13FCD
 7: 00007FF788E13029
 8: 00007FF788E12F0B
 9: 000003F3C195C6C1

@apapirovski
Copy link
Member

Given the lack of a follow up and the fact that we're now significantly past 10.7.0, I'm going to close this out. Feel free to reopen if you believe this to still be an issue that needs addressing.

@mrts
Copy link

mrts commented Feb 2, 2019

Same problem with Node v10.15.1 on 64-bit Windows 10 (with a bit different stack trace):

$ node -v
v10.15.1

$ npm -v
6.4.1

$ which npm
/c/Program Files/nodejs/npm

$ npm install -g npm
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
npm[2360]: src\node_zlib.cc:460: Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
 1: 00007FF6D1660EFA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
 2: 00007FF6D163A296 node::MakeCallback+4518
 3: 00007FF6D163A34F node::MakeCallback+4703
 4: 00007FF6D1594AAD v8::internal::ParseInfo::end_position+94893
 5: 00007FF6D1E6ADD2 v8::internal::OptimizingCompileDispatcher::Unblock+60562
 6: 00007FF6D1E6C26D v8::internal::OptimizingCompileDispatcher::Unblock+65837
 7: 00007FF6D1E6B2C9 v8::internal::OptimizingCompileDispatcher::Unblock+61833
 8: 00007FF6D1E6B1AB v8::internal::OptimizingCompileDispatcher::Unblock+61547
 9: 000003D1B415C5C1

@mrts
Copy link

mrts commented Feb 2, 2019

@trygve-lie or @apapirovski , can you please reopen this?

@bricss
Copy link

bricss commented Feb 2, 2019

@mrts first, run npm remove -g npm and check again.

@mrts
Copy link

mrts commented Feb 2, 2019

@bricss , no luck unfortunately (I'm using npm that is bundled with Node.js):

$ npm -v
6.4.1

$ which npm
/c/Program Files/nodejs/npm

$ rm -r ~/AppData/Roaming/npm/ ~/AppData/Roaming/npm-cache/

$ npm remove -g npm
up to date in 0.05s

$ npm install -g npm
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
npm[7788]: src\node_zlib.cc:460: Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
 1: 00007FF6C7CE0EFA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
 2: 00007FF6C7CBA296 node::MakeCallback+4518
 3: 00007FF6C7CBA34F node::MakeCallback+4703
 4: 00007FF6C7C14AAD v8::internal::ParseInfo::end_position+94893
 5: 00007FF6C84EADD2 v8::internal::OptimizingCompileDispatcher::Unblock+60562
 6: 00007FF6C84EC26D v8::internal::OptimizingCompileDispatcher::Unblock+65837
 7: 00007FF6C84EB2C9 v8::internal::OptimizingCompileDispatcher::Unblock+61833
 8: 00007FF6C84EB1AB v8::internal::OptimizingCompileDispatcher::Unblock+61547
 9: 0000025201E5C5C1

Can I provide more information or help to debug this further in any other way?

I did look into source and I can see that the error can only happen when the function is called with 5 arguments instead of 7. It's quite baffling that this happens with the npm bundled with Node.js.

@finbarmaginn
Copy link

finbarmaginn commented Feb 6, 2019

Still no resolve? I tried updating my node to 10.15.1 today and NPM is behaving the same way. npm version is 6.4.1.

I followed recommended steps and npm install -g npm yields the following:

WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
npm[4984]: src\node_zlib.cc:460: Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
 1: 00007FF764000EFA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
 2: 00007FF763FDA296 node::MakeCallback+4518
 3: 00007FF763FDA34F node::MakeCallback+4703
 4: 00007FF763F34AAD v8::internal::ParseInfo::end_position+94893
 5: 00007FF76480ADD2 v8::internal::OptimizingCompileDispatcher::Unblock+60562
 6: 00007FF76480C26D v8::internal::OptimizingCompileDispatcher::Unblock+65837
 7: 00007FF76480B2C9 v8::internal::OptimizingCompileDispatcher::Unblock+61833
 8: 00007FF76480B1AB v8::internal::OptimizingCompileDispatcher::Unblock+61547
 9: 000000FA4C05C5C1

Edit: Using windows 8.1 👎

@ificator
Copy link

I was having the same issue and eventually tracked it down to old files being left behind in c:\Program Files\nodejs\node_modules\npm\node_modules\tar\node_modules. After installing the latest 10 version (10.15.3) there should only be yallist, but I had two others including an old version of minizlib. Deleting them fix things for me.

My guess is that I got into this state by installing the newer nodejs over top of the old one, and there's a bug in the upgrade path where files that aren't required any more are not removed. After this point even uninstalling nodejs entirely doesn't remove the "bad" files - the installer probably only removes the stuff it thinks it installed. This is all supposition on my part as I never watched what the upgrade process did.

@pdehne
Copy link

pdehne commented Apr 1, 2019

I had the same problem on Windows 10. After reading @ificator comment I just uninstalled nodejs, manually removed the leftover nodejs folder in %programfiles% and installed nodejs again. That fixed it for me.

@mrts
Copy link

mrts commented Apr 1, 2019

Thanks, @ificator and @pdehne! Uninstalling Node.js and manually removing the leftover nodejs folder in Program Files fixed this for me as well.

@AnesuMurakata
Copy link

Thanks @ificator ! I had the same problem for a day and couldn't find a fix till I tried your solution.

@etlds
Copy link

etlds commented May 20, 2019

Thanks, @ificator! It works for me after deleting 2 folders other than yallist

@hensyou
Copy link

hensyou commented Jul 4, 2019

@ificator It works, thank you so much for sharing this trick!

@Tharaka92
Copy link

In my case I didn't have any leftover folders inside Program Files. But I had couple of folders(npm and npm-cache) in "C:\Users{username}\AppData\Roaming" folder. Deleted them permanently and reinstalled node. Works fine now.

@AravindhGopi
Copy link

AravindhGopi commented Dec 30, 2019

After uninstallling nodejs from your system you have to manually remove all the files in
c:\Program Files\nodejs

This worked for me

@Teddy-Sannan
Copy link

So how exactly could I solve this issue on a raspberry pi?

@d-lokesh
Copy link

d-lokesh commented Mar 29, 2020

In my case I didn't have any leftover folders inside Program Files. But I had couple of folders(npm and npm-cache) in "C:\Users{username}\AppData\Roaming" folder. Deleted them permanently and reinstalled node. Works fine now.

it worked for me

@mishal23
Copy link

@ificator thanks for your solution! It worked for me on Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Issues and PRs related to the npm client dependency or the npm registry.
Projects
None yet
Development

No branches or pull requests