[英]Preparation work before executing the app Plesk NodeJS
The problem is that you are importing some modules in your app.js with the import function, but you can't do that because you are stating in your config to treat your js files as module, to import external modules inside ES modules you should use the following structure:问题是您正在使用导入 function 在 app.js 中导入一些模块,但您不能这样做,因为您在配置中声明将 js 文件视为模块,要在 ES 模块中导入外部模块,您应该使用以下结构:
"import { something } from /path/to/module" “从 /path/to/module 导入 {something}”
Let me know if it solved your problem!让我知道它是否解决了您的问题!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.