use of `unzip` makes upgrade path to node 10 complicated
michaelglass opened this issue · 6 comments
got this warning when running npm install
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated natives@1.1.3: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
and subsequently, got this error
ChildProcessError: Command failed: (cd test_app && ./node_modules/.bin/binwrap-install darwin x64)
node[3187]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[1]->IsString()' failed.
1: node::Abort() [node]
2: 0x87b6c5 [node]
3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [node]
4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [node]
5: 0xad5b9f [node]
6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
7: 0x13ae0b30427d
Aborted (core dumped)
`(cd test_app && ./node_modules/.bin/binwrap-install darwin x64)` (exited with error code 134)
at callback (node_modules/child-process-promise/lib/index.js:33:27)
at ChildProcess.exithandler (child_process.js:289:5)
at maybeClose (internal/child_process.js:947:16)
at Socket.stream.socket.on (internal/child_process.js:368:11)
at Pipe._handle.close [as _onclose] (net.js:598:12)
(see https://travis-ci.org/avh4/binwrap/jobs/374288327)
When I was using binwrap with elm@0.18.0-exp5, it transitively installed natives@1.1.2 which caused nodejs/node#20281
Because this package had installed natives@1.1.3 I didn't see the problem locally.
I figured out the issue is related to unzip's transitive usage of natives
Can we find a way to reproduce this on CI? It sounds like the issue occurs only for people who are installing packages built by binwrap (and not for the person using binwrap to publish a package)? Does it only happen for projects that have a package.json, or does it happen for npm install -g too (doesn't really matter if we know the answer to this question)? Does it happen if the binwrapped package is the only thing being installed, or does it require certain other packages to be installed?
Commented here: #14 (comment)
fixed #15, will close this issue when a new version is released. Thanks!
As a note to others finding this issue: the root problem here is that npm does not tell you if one of your transitive dependencies is incompatible with your version of node. It is necessary to update your package-lock.json appropriately when upgrading to node 10.
0.2.0 released