库可以用命令npm i mriya安装,我想运行的命令是node -r mriya。当我需要一个CommonJS模块时,它可以工作,但是当它是ES模块时,命令将在以下消息中失败
[Error [ERR_REQUIRE_ESM]: require() of ES Module mriya-testInstead change the require of mriya.js in null to a dynamic import() which is av
但是它没有构建,并且有一个错误。Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: │ │ require() of ES modules is not supported│
│ require() of ~~/nuxt.config.js from所以我删除了package.js
如何将pm2与基于ES模块的包(类型:“模块”)结合使用,我在没有任何有用帮助的情况下研究了类似的问题(有人说它在windows上不起作用,但我使用的是linux)。我总是收到错误:
Error [ERR_REQUIRE_ESM]: require() of ES Module /opt/app/server/lib/src/index.js not sup