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 Bug #2968

Open
apurbapathak opened this issue Sep 6, 2024 · 2 comments
Open

Docker Bug #2968

apurbapathak opened this issue Sep 6, 2024 · 2 comments

Comments

@apurbapathak
Copy link

33.67 server build: > SWC Running...
35.00 server build: Successfully compiled: 209 files with swc (346.63ms)
35.75 server build: Done
46.02 client build: ℹ ✓ 889 modules transformed.
46.03 client build: ERROR x Build failed in 25.02s
46.03 client build: ERROR Nuxt Build Error: [vite:load-fallback] Could not load /home/build/client/buildMetadata.json (imported by app/components/About.vue?vue&type=script&setup=true&lang.ts): ENOENT: no such file or directory, open '/home/build/client/buildMetadata.json'
46.03 client build: at async open (node:internal/fs/promises:639:25)
46.03 client build: at async Object.readFile (node:internal/fs/promises:1242:14)
46.03 client build: at async Object.load (/home/build/node_modules/.pnpm/vite@5.3.4_@types[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-D8YhmIY-.js:65386:25)
46.03 client build: at async PluginDriver.hookFirstAndGetPlugin (/home/build/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:19708:28)
46.03 client build: at async /home/build/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:18879:33
46.03 client build: at async Queue.work (/home/build/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:19918:32)
61.24 client build: app/components/About.vue(5,53): error TS2307: Cannot find module '~~/buildMetadata.json' or its corresponding type declarations.
61.38 client build: Failed
61.39 /home/build/client:
61.39  ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @viewtube/client@ build: cross-env NUXT_BUILD=true nuxi build
61.39 Exit status 1
61.44  ELIFECYCLE  Command failed with exit code 1.

failed to solve: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 1
root@vmi2090944:/www/wwwroot/viewtube#

@jayp76
Copy link

jayp76 commented Oct 1, 2024

same here

@gareins
Copy link

gareins commented Oct 9, 2024

So I have no idea when this was broken, I think the authors just use the github tools as its done outside the docker build in .github/workflows/build-workflow.yml so dockerfile creating should work if the buildMetadata.json is prebuilt.

Anyway I fixed this by removing .git from .dockerignore and then manually calling the build step that builds this file, so in Dockerfile just before RUN pnpm run build add this line: RUN pnpm run build:metadata.

I am first time around these parts, if the authors wanna chime in on how to properly solve this, I would be happy :)

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

3 participants