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

Not working with Node 12, primordials is not defined #122

Open
martinlevesque opened this issue Apr 27, 2019 · 4 comments
Open

Not working with Node 12, primordials is not defined #122

martinlevesque opened this issue Apr 27, 2019 · 4 comments

Comments

@martinlevesque
Copy link

martinlevesque commented Apr 27, 2019

With Node 12, simply doing a require("unzip") will crash your application with the following error:

const { Math, Object, Reflect } = primordials;
                                  ^

ReferenceError: primordials is not defined
    at fs.js:27:35
    at req_ (/home/martin/works/XXX/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/home/martin/works/XXX/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/home/martin/works/XXX/node_modules/fstream/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
@martinlevesque martinlevesque changed the title Not working with Node 12, Not working with Node 12, primordials is not defined Apr 27, 2019
@ZeldaZach
Copy link

Had the same issue on my project. Moved to unzipper fork instead, since this project seems abandoned unfortunately

@dshook
Copy link

dshook commented Aug 15, 2019

The error I was getting when requiring this after the upgrade to node 12 is this:

/usr/local/bin/node[190]: ../src/node_contextify.cc:651:static void node::contextify::ContextifyScript::New(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[1]->IsString()' failed.

Hopefully will save someone else some time since search was coming up pretty empty on that one

@jacobq
Copy link

jacobq commented Sep 25, 2019

Same root cause as #115

@BoWang816
Copy link

I changed my node version to 10.16.0, and it works

jbeezley added a commit to jbeezley/grunt-fontello that referenced this issue Jan 10, 2020
yohanboniface added a commit to kosmtik/kosmtik-fetch-remote that referenced this issue Mar 23, 2020
towerofnix added a commit to decent-chat/decent that referenced this issue Mar 9, 2021
Depends on old packages (see EvanOxfeld/node-unzip#122).

Means it doesn't work in node v12, which I guess we don't have to
target, but like, c'mon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants