Closed Fatme closed 6 years ago
Are you sure this is not a problem with your test file? I ran the test suite of unzip
on the node 10.0.0 docker image and all the tests passed? Can you share the test.js
Hi @ZJONSSON
I've created a repro project https://github.com/Fatme/unzip-node10
Steps to reproduce:
git clone git@github.com:Fatme/unzip-node10.git
NOTE: I've tested it on Mac OS High Sierra
I can confirm the issue is reproducible on windows too. I tested it on windows 10. Tested with this: https://nodejs.org/en/download/current/
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.
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: https://github.com/addaleax/natives/commits/v1.1.3
So the solution for us was to:
npm i
npm shrinkwrap
It seems
unzip
does not work with version 10.0.0 of nodejs.Steps to reproduce:
node test.js
== An error is thrown ==
node[29597]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo &): 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::FunctionCallbackInfo 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::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate , v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, 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