How to fix ReferenceError: primordials is not defined in node

久未见 提交于 2019-11-28 18:05:08
Hassan Hodges

I hit the same error. I suspect you're using node 12 and gulp 3. That combination does not work: https://github.com/gulpjs/gulp/issues/2324

A previous workaround from Jan. does not work either: https://github.com/gulpjs/gulp/issues/2246

Solution: Either upgrade to gulp 4 or downgrade to an earlier node.

had same error and finally fix that when updated all packages and then mentioned the same node engine version and npm version in package.json as it is in my local working system.

 "engines": {
    "node": "10.15.3",
    "npm": "6.9.0"
 }

i was getting this error when deploying on heroku.

for more checkout heroku support

Using NVM to manage what node version you're using, running the following commands worked for me:

$ cd /to/your/project/
$ nvm install lts/dubnium
$ nvm use lts/dubnium
$ yarn upgrade # or `npm install`

Downgrading to node stable fixed this issue for me, as it occurred after I upgraded to node 12

sudo n 10.16.0

user1754317

I was getting this error on Windows 10. Turned out to be a corrupted roaming profile.

npm ERR! node v12.4.0
npm ERR! npm  v3.3.12

npm ERR! primordials is not defined
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:

Deleting the C:\Users\{user}\AppData\Roaming\npm folder fixed my issue.

Upgrade to 4.0.1 and make sure to migrate https://fettblog.eu/gulp-4-parallel-and-series/#migration

I faced the same issue. What i tried and worked for me:- 1). Check the version of NODE and GULP (combination of node v12 and gulp less than v4 doesn't work) 2). I downgrade npm version by : #sudo npm install -g n #sudo n 10.16.0 It worked fine, then just follow instruction of your consol

i have same problem, but i have solved this problem. i suggest you first, first make sure npm install your not problem. then you downgrade version node and gulp. i used version node 10.16.1 and gulp 3.9.1. for downgrade your gulp you can write

npm install gulp@^3.9.1
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!