Closed moverware closed 2 weeks ago
Failed to copy traced files for /home/mover/lekondo-cotton/.next/server/app/(central)/page.js [Error: ENOENT: no such file or directory, copyfile '/home/mover/lekondo-cotton/.next/server/app/(central)/page_client-reference-manifest.js' -> '/home/mover/lekondo-cotton/.next/standalone/.next/server/app/(central)/page_client-reference-manifest.js']
This error indicates that something went wrong with next build
itself, and since that's used by OpenNext to compute the server functions it explains the fail. You could try removing the .next
folder
When you move folders/filers around in next, you usually need to do a clean wipe of .next
. There are some weird reference caching that can cause build issues.
@conico974 @khuezy next build
goes off with out a hitch. I have cleared .next
, .sst
, etc. This also fails in my Github actions (that dont have a cache). But these are local logs currently.
y build
Found '/home/mover/lekondo-cotton/.nvmrc' with version <18.18.0>
Now using node v18.18.0 (npm v9.8.1)
yarn run v1.22.19
$ next build
▲ Next.js 14.2.13
- Environments: .env.local
- Experiments (use with caution):
· instrumentationHook
Creating an optimized production build ...
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
✓ Generating static pages (18/18)
Finalizing page optimization . Collecting build trace
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ƒ / 3.58 kB 249 kB
├ ○ /_not-found 1.03 kB 184 kB
├ ƒ /api/auth/[auth0] 0 B 0 B
├ ƒ /api/auth/dev/dangerouslyGetAPIToken 0 B 0 B
├ ƒ /collection 1.15 kB 189 kB
├ ƒ /collection/[collectionId] 8.8 kB 271 kB
├ ƒ /collection/[collectionId]/item/[itemId] 3.33 kB 228 kB
├ ƒ /collection/[collectionId]/item/[itemId]/edit 413 B 225 kB
├ ○ /dev 1.48 kB 189 kB
├ ƒ /discovery 322 B 183 kB
├ ƒ /manifesto 323 B 183 kB
├ ○ /onboarding/assignment1 2.56 kB 221 kB
├ ○ /onboarding/assignment2 2.7 kB 236 kB
├ ○ /onboarding/assignment3 2.45 kB 263 kB
├ ○ /onboarding/assignment4 3.53 kB 229 kB
├ ○ /onboarding/welcome 673 B 191 kB
├ ƒ /settings 322 B 183 kB
├ ƒ /settings/privacy 1.57 kB 197 kB
├ ƒ /settings/profile 1.66 kB 213 kB
└ ƒ /symposium/[tag] 5.95 kB 224 kB
+ First Load JS shared by all 183 kB
├ chunks/52774a7f-acd6185c7912d037.js 36.1 kB
├ chunks/5347-99e5327102b28534.js 90.4 kB
├ chunks/fd9d1056-7ab42e1942c648c4.js 53.8 kB
└ other shared chunks (total) 2.54 kB
ƒ Middleware 160 kB
○ (Static) prerendered as static content
ƒ (Dynamic) server-rendered on demand
Done in 75.21s.
You're not running next build
with ouput standalone, which is what OpenNext do and need.
This part is failing, the error i showed you is not originating from OpenNext, but from Next itself
Is this standalone output? I don't have next
globally installed or anything:
./node_modules/.bin/next build
▲ Next.js 14.2.13
- Environments: .env.local
- Experiments (use with caution):
· instrumentationHook
Creating an optimized production build ...
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
✓ Generating static pages (18/18)
Finalizing page optimization . Collecting build trace
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ƒ / 3.58 kB 249 kB
├ ○ /_not-found 1.03 kB 184 kB
├ ƒ /api/auth/[auth0] 0 B 0 B
├ ƒ /api/auth/dev/dangerouslyGetAPIToken 0 B 0 B
├ ƒ /collection 1.15 kB 189 kB
├ ƒ /collection/[collectionId] 8.8 kB 271 kB
├ ƒ /collection/[collectionId]/item/[itemId] 3.33 kB 228 kB
├ ƒ /collection/[collectionId]/item/[itemId]/edit 413 B 225 kB
├ ○ /dev 1.48 kB 189 kB
├ ƒ /discovery 322 B 183 kB
├ ƒ /manifesto 323 B 183 kB
├ ○ /onboarding/assignment1 2.56 kB 221 kB
├ ○ /onboarding/assignment2 2.7 kB 236 kB
├ ○ /onboarding/assignment3 2.45 kB 263 kB
├ ○ /onboarding/assignment4 3.53 kB 229 kB
├ ○ /onboarding/welcome 673 B 191 kB
├ ƒ /settings 322 B 183 kB
├ ƒ /settings/privacy 1.57 kB 197 kB
├ ƒ /settings/profile 1.66 kB 213 kB
└ ƒ /symposium/[tag] 5.95 kB 224 kB
+ First Load JS shared by all 183 kB
├ chunks/52774a7f-acd6185c7912d037.js 36.1 kB
├ chunks/5347-99e5327102b28534.js 90.4 kB
├ chunks/fd9d1056-7ab42e1942c648c4.js 53.8 kB
└ other shared chunks (total) 2.53 kB
ƒ Middleware 160 kB
○ (Static) prerendered as static content
ƒ (Dynamic) server-rendered on demand
Looks to me like the error originates from the OpenNext — Generating bundle
, after the build is successful. Is there a way for me to run this step via next
directly?
The first error which is the exact same btw is originating from next build
To run in standalone https://nextjs.org/docs/app/api-reference/next-config-js/output#automatically-copying-traced-files
Nice, same error in standalone mode. I'll open an issue with Next directly, thanks!
Can you try upgrading your next version? I'm using groups too and haven't had issues building/copying groups.
I just migrated from
app/central/...
toapp/(central)/...
to share a layout but remove the url grouping, as explained in the nextjs docs here: https://nextjs.org/docs/app/building-your-application/routing/route-groupsBut this breaks my SST deploy / OpenNext build. My dir layout is:
The error message:
next.config.mjs
:sst.config.ts
: