cdk-nextjs: .next folder missing from standalone.zip
Any ideas why .next folder is missing from standalone.zip?
+ zip -ryq1 /tmp/nextjs-cdk-build-cJGhSY/standalone/standalone.zip node_modules package.json server.cjs server.cjs.map server.js server.js.map
Bundling asset oam-web/Web/ImgOptFn/Code/Stage...
packages/web/cdk.out/bundling-temp-132480d4ff30450d18988a5dd5e22b14df829e19d7adb24b82ca76b24a6077a3/index.js 1.3mb ⚠️
⚡ Done in 2651ms
I am assuming that leads to this error:
“ENOENT: no such file or directory, open ‘/var/task/.next/required-server-files.json’”
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (10 by maintainers)
Supporting windows natively probably would increase interest in this project…if that happens to be a goal.
We use jszip for the S3 rewriter: https://github.com/jetbridge/cdk-nextjs/blob/main/assets/lambda/S3EnvRewriter.ts
I believe it should be possible to get working on WSL. Ideally we would not be shelling out to zip and instead building the archive programatically.
My output is the same but Next runs okay when deployed: