Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using docker error #119

Open
termiliya opened this issue Jul 14, 2023 · 1 comment
Open

using docker error #119

termiliya opened this issue Jul 14, 2023 · 1 comment

Comments

@termiliya
Copy link

termiliya commented Jul 14, 2023

操作流程:

1 clone项目
2 docker build -t cr-bot .
3 docker run -e APP_ID=person -e PRIVATE_KEY=sk-xxxx cr-bot

我的环境:

nodejs 12.22.9     npm 8.5.1     yarn 1.22.19

错误内容如下:

ubuntu@ip-172-31-24-47:~/ChatGPT-CodeReview$ docker run -e APP_ID=person -e PRIVATE_KEY=sk-xxxx cr-bot
yarn run v1.22.19
$ node -r dotenv/config ./dist/index.js
node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module '/usr/src/app/dist/index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.16.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@anc95
Copy link
Owner

anc95 commented Aug 7, 2023

你好,需要使用 yarn build 先构建一下项目

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants