anc95 / anc95/ChatGPT-CodeReview
using docker error
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 4.5k
- Forks
- 461
- PR merge metrics
- No merged PRs in 30d
Description
操作流程:
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported docker build and docker run commands, then inspect whether the image contains the dist/index.js entry point mentioned in the error. Trace the container startup command and identify why that file is unavailable; done means the documented Docker run starts without the reported MODULE_NOT_FOUND error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript, nodejs
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100