【发布时间】:2021-09-17 22:57:28
【问题描述】:
我在尝试运行名为 -> 帐户的微服务时遇到此问题。
yarn run v1.22.5
$ nest start
internal/modules/cjs/loader.js:905
Error: Cannot find module '/home/node/services/accounts/dist/main'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
其中,accounts 是微服务的名称。
我尝试运行 yarn install 但仍然给我同样的错误。 另外,我尝试删除 dist 文件夹并重新启动微服务,但同样的问题仍然存在。
【问题讨论】:
-
您何时看到此错误?你在跑什么?请添加更多详细信息,以便为您的问题找到正确的解决方案,任何人都很难理解问题所在。
-
@ApoorvaChikara 我已经更新了。我希望现在更清楚了。
标签: node.js microservices nestjs