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

ReferenceError: primordials is not defined #222

Closed
itsazzad opened this issue Mar 12, 2020 · 3 comments
Closed

ReferenceError: primordials is not defined #222

itsazzad opened this issue Mar 12, 2020 · 3 comments

Comments

@itsazzad
Copy link

itsazzad commented Mar 12, 2020

gulp watch

Requiring external module @babel/register
fs.js:35
} = primordials;
^

ReferenceError: primordials is not defined
at fs.js:35:5
at req_ (.../node_modules/natives/index.js:143:24)
at Object.req [as require] (.../node_modules/natives/index.js:55:10)
at Object. (.../node_modules/graceful-fs/fs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Module._compile (.../node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Object.newLoader [as .js] (.../node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)

@wungjaelee
Copy link

I think this has to do with some compatibility issue with the node version. I was using node 13.15.0 and was getting this issue, but the issue was gone after I changed the node version to 10.16.0

@waglik
Copy link

waglik commented Apr 13, 2020

Update Gulp locally to 4.0.0 and it starts to work. Though I run into other issues so not sure if this was related or not.

@snowman
Copy link

snowman commented Sep 30, 2020

It works!!!

➜ nvm ls
         v8.9.0
       v10.18.0
       v10.18.1
->     v12.14.0
         system

➜ gulp babel
[11:24:24] Requiring external module @babel/register
ReferenceError: primordials is not defined
    at fs.js:27:26
    at req_ (/tmp/my-new-chrome-extension/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/tmp/my-new-chrome-extension/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
➜ nvm use v10.18.0
Now using node v10.18.0 (npm v6.13.4)

➜ gulp babel
[11:25:47] Requiring external module @babel/register
[11:25:48] Using gulpfile /tmp/my-new-chrome-extension/gulpfile.babel.js
[11:25:48] Starting 'babel'...
[11:25:48] Finished 'babel' after 85 ms

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