Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not work with nodejs v10.0.0

See original GitHub issue

It seems unzip does not work with version 10.0.0 of nodejs.

Steps to reproduce:

  1. Install node 10
  2. Add this to some file - for example test.js
const unzip = require("unzip");
  1. Execute the file - node test.js

## == An error is thrown ==

node[29597]: …/src/ void node::contextify::ContextifyScript::New(const FunctionCallbackInfov8::Value &): Assertion `args[1]->IsString()’ failed. 1: node::Abort() [/Users/havaluova/.nvm/versions/node/v10.0.0/bin/node] 2: node::InternalCallbackScope::~InternalCallbackScope() [/Users/havaluova/.nvm/versions/node/v10.0.0/bin/node] 3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfov8::Value const&) [/Users/havaluova/.nvm/versions/node/v10.0.0/bin/node] 4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/Users/havaluova/.nvm/versions/node/v10.0.0/bin/node] 5: v8::internal::MaybeHandlev8::internal::Object v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::FunctionTemplateInfo, v8::internal::Handlev8::internal::Object, v8::internal::BuiltinArguments) [/Users/havaluova/.nvm/versions/node/v10.0.0/bin/node] 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/havaluova/.nvm/versions/node/v10.0.0/bin/node] 7: 0x36e10e38427d Abort trap: 6

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

rosen-vladimirovcommented, May 2, 2018

Hey all, Together with @Fatme we have investigated this case further and it turns out the problem is caused by our npm-shrinkwrap.json (same will happen in case you use package-lock.json). So, what is the problem - unzip package depends on fstream package. It has a dependency on graceful-fs version 3.0.11. As you can see here this version of graceful-fs depends on the natives package by using ^1.1.0. In our case, in npm-shrinkwrap.json we had the version of natives set to 1.1.2. However, there’s a newer version of the natives package that addresses the issue with Node.js 10.x.x - 1.1.3:

So the solution for us was to:

  1. Delete node_modules
  2. Delete npm-shrinkwrap.json (in your case it might be package-lock.json)
  3. Execute npm i
  4. Execute npm shrinkwrap
GitHugcommented, May 1, 2018

I can also confirm that this package does not seem to work on nodejs v10.0.0 and I get the same error as @Fatme. Another way to reproduce it is to open the Node repl and type require("unzip"). I use unzip version 0.1.11.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm does not support Node.js v10.15.2 · Issue #1877 - GitHub
It looks like current installed npm is not compatible with Node.js version you are using. You'll probably need to update your npm using...
Read more >
Error npm is known not to run on Node.js v10.24.1 and how to ...
Open you terminal and verify you have the latest version using node -v . Verify your npm version too using npm -v ....
Read more >
Node v10.0.0 (Current)
Node.js ® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Read more >
npm does not support Node.js v10.19.0 - Ask Ubuntu
Short Answer. The simplest is to update to Node.js v14: curl -fsSL | sudo -E bash - sudo apt-get ...
Read more >
Fix: npm does not support Node.js v10.19.0 You ... - YouTube
Fix: npm does not support Node.js v10.19.0 You should probably upgrade to a newer version of node. · Comments • 31.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found