Next.js project build missing public assets during deployment

Hi I have a next.js project configured with workers. It has connected to github and triggers a build automatically. My build command is:
npx opennextjs-cloudflare build
npx opennextjs-cloudflare build
Deploy command is:
npx opennextjs-cloudflare deploy
npx opennextjs-cloudflare deploy
Now the issue is that if I run the deploy command from my local machine, everything gets uploaded, showing ~100 files from the assets directory. But if it's a build by cloudflare, it only shows 6 files from the assets directory, everything under /_next/static is missing. What could be causing this issue?
1 Reply
qwertyuiop
qwertyuiopOP6mo ago
Resolved. It's caused by this build variable: NODE_VERSION=20.0.0 The project was migrated from pages and this variable was set to build the latest next project. But now with workers, this variable should be removed

Did you find this page helpful?