在Vue CLI项目中使用NodeJS的过程

我在Vue CLI项目的process.on文件中使用节点的main.js函数遇到了挑战。 我的文件中包含以下代码。

process.on("unhandledRejection",function(reason,promise){
  console.log("Unhandled",reason,promise); // log all your errors,"unsuppressing" them.
  throw reason; // optional,in case you want to treat these as errors
});

项目已构建,但是在浏览器中打开应用程序时,出现错误:

Uncaught TypeError: process.on is not a function

如何配置项目,以便可以使用Node的进程? 在这种情况下,我是否不了解NodeJS? 我有什么想念的吗? 感谢您的任何帮助。

sakura52 回答:在Vue CLI项目中使用NodeJS的过程

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2979706.html

大家都在问