eyetech
eyetech
CDCloudflare Developers
Created by eyetech on 9/30/2024 in #workers-help
Reaching 1MB size limit with nextjs on workers
Hey community / cloudflare team, im trying the new next.js on workers approach (opennext adapter) instead of using next-on-pages but im getting size limit error
▲ [WARNING] Here are the 5 largest dependencies included in your script:

-
node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/node-fetch/index.js
- 784.40 KiB
- .worker-next/index.mjs - 674.17 KiB
-
node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/terser/bundle.min.js
- 463.62 KiB
-
.next/standalone/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js
- 332.93 KiB
- .worker-next/.next/standalone/.next/server/chunks/250.js - 281.62 KiB
If these are unnecessary, consider removing them



✘ [ERROR] A request to the Cloudflare API (....) failed.

Your Worker exceeded the size limit of 1 MiB. Refer to the Workers documentation
(https://developers.cloudflare.com/workers/observability/errors/#errors-on-worker-upload) for more
details. [code: 10027]

If you think this is a bug, please open an issue at:
https://github.com/cloudflare/workers-sdk/issues/new/choose


 ELIFECYCLE  Command failed with exit code 1.
▲ [WARNING] Here are the 5 largest dependencies included in your script:

-
node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/node-fetch/index.js
- 784.40 KiB
- .worker-next/index.mjs - 674.17 KiB
-
node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/terser/bundle.min.js
- 463.62 KiB
-
.next/standalone/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js
- 332.93 KiB
- .worker-next/.next/standalone/.next/server/chunks/250.js - 281.62 KiB
If these are unnecessary, consider removing them



✘ [ERROR] A request to the Cloudflare API (....) failed.

Your Worker exceeded the size limit of 1 MiB. Refer to the Workers documentation
(https://developers.cloudflare.com/workers/observability/errors/#errors-on-worker-upload) for more
details. [code: 10027]

If you think this is a bug, please open an issue at:
https://github.com/cloudflare/workers-sdk/issues/new/choose


 ELIFECYCLE  Command failed with exit code 1.
Of course im using the free plan, but the app is quite simple, I was not expecting getting this too earlier. Any tip? thank you!
2 replies
CDCloudflare Developers
Created by eyetech on 4/12/2024 in #workers-help
Workers AI: getting internal server error
When doing the following call const res = await ai.run('@cf/mistral/mistral-7b-instruct-v0.1', { messages, max_tokens: 1000 }); return c.json({ res }) I'm getting InferenceUpstreamError, httpCode: 504. Any ideas, if i run with the default tokens size (not specifying max_tokens) it seems to work. Btw, running this locally.
1 replies