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

[需要帮助]docker构建镜像错误 #41

Open
wydweb opened this issue Jun 15, 2024 · 0 comments
Open

[需要帮助]docker构建镜像错误 #41

wydweb opened this issue Jun 15, 2024 · 0 comments

Comments

@wydweb
Copy link

wydweb commented Jun 15, 2024

请教个新手问题😂,我想构建成docker镜像,但是一直不成功
在本地使用pnpm run dev是可以正常运行的,构建docker一直卡在RUN pnpm build这里提示我MODULE_NOT_FOUND

RUN pnpm build
> [email protected] build /app
> nuxi build
node:internal/modules/cjs/loader:1143
throw err;
^
Error: Cannot find module '/app/node_modules/nuxt/bin/nuxt.mjs'
at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
at Module._load (node:internal/modules/cjs/loader:981:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.20.3
 ELIFECYCLE  Command failed with exit code 1.
------
Dockerfile:11
--------------------
   9 |
  10 |     COPY . .
  11 | >>> RUN pnpm build
  12 |
  13 |     FROM $NODE_VERSION AS production-stage
--------------------
ERROR: failed to solve: process "/bin/sh -c pnpm build" did not complete successfully: exit code: 1
@wydweb wydweb changed the title docker构建镜像错误 [问题]docker构建镜像错误 Jun 15, 2024
@wydweb wydweb changed the title [问题]docker构建镜像错误 [需要帮助]docker构建镜像错误 Jun 15, 2024
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

1 participant