Does not work with nodejs v10.0.0
See original GitHub issueIt seems unzip
does not work with version 10.0.0 of nodejs.
Steps to reproduce:
- Install node 10
- Add this to some file - for example test.js
const unzip = require("unzip");
- Execute the file -
node test.js
## == An error is thrown ==
node[29597]: …/src/node_contextify.cc:631:static 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:
- Created 5 years ago
- Comments:5
Top GitHub Comments
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 onfstream
package. It has a dependency ongraceful-fs
version 3.0.11. As you can see here this version of graceful-fs depends on thenatives
package by using^1.1.0
. In our case, in npm-shrinkwrap.json we had the version ofnatives
set to 1.1.2. However, there’s a newer version of thenatives
package that addresses the issue with Node.js 10.x.x - 1.1.3: https://github.com/addaleax/natives/commits/v1.1.3So the solution for us was to:
npm i
npm shrinkwrap
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.