javascript NodeJS - 未捕获的 ReferenceError:原始值未定义
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/56032300/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
NodeJS - Uncaught ReferenceError: primordials is not defined
提问by OpperDev
So that's all, I'm developing a program with electron, everything worked good, as if on wheels, until, I do my little npm start, as usual, I test my application a little, and I see that the javascript does not work anymore So, I do a little 'Ctrl + Shift + I' and I see in the console, that none of my modules have been imported, because at the very top, we have a great error: 'Uncaught ReferenceError: primordials is not defined' in 'inspect.js' I searched all over the internet, and the few answers I found, are people who have a problem with gulp and who do not have the right version, except that I do not use gulp so it does not can not come from there
就是这样,我正在用电子开发一个程序,一切都运行良好,就像在轮子上一样,直到我做我的小 npm start,像往常一样,我测试了我的应用程序,我发现 javascript 不起作用所以,我做了一点“Ctrl + Shift + I”,我在控制台中看到,我的模块都没有被导入,因为在最顶端,我们有一个很大的错误:'Uncaught ReferenceError: primordials is not defined ' 在 'inspect.js' 中,我搜索了整个互联网,我找到的几个答案是那些对 gulp 有问题并且没有正确版本的人,除了我不使用 gulp 所以它不能不是从那里来的
That's all, so if someone has a solution, I'm interested!
就是这样,所以如果有人有解决方案,我很感兴趣!
- node -v > v10.15.3
- npm -v > 5.3.0 (I've tested with 6.9.0 too)
- 节点 -v > v10.15.3
- npm -v > 5.3.0(我也用 6.9.0 测试过)
thank you in advance
先感谢您
回答by SGZL
I met a similar error today and I just solved the problem. Check this link :
我今天遇到了类似的错误,我刚刚解决了这个问题。检查此链接:
How to Fix ReferenceError: primordials is not defined in node
My error is the same as described in the link. The problem is that the combination of node 12 and gulp 3 does not work. So I downgrade node to v11.15.0. It really works!
我的错误与链接中描述的相同。问题是节点12和gulp 3的组合不起作用。所以我将节点降级到 v11.15.0。真的行!
You can try it. Hope it can help you!
你可以试试看。希望能帮到你!

