Rasheeddev
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
Please can you explain any way i can manage my functions for a lesser production files
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
This was the last error i got on adding edge runtime export to my routes
07:47:30.026 ✨ Success! Uploaded 22 files (68 already uploaded) (1.59 sec)
07:47:30.026
07:47:30.380 ✨ Upload complete! 07:47:32.748 Success: Assets published! 07:47:35.410 Error: Failed to publish your Function. Got error: Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_large)
07:47:30.380 ✨ Upload complete! 07:47:32.748 Success: Assets published! 07:47:35.410 Error: Failed to publish your Function. Got error: Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_large)
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
Okay I will need to run it again before have cancelled it
I wants to confirm pls, Do you mean when i add this to my nextconfig file
experimental: {
runtime: 'experimental-edge',
},
?
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
yes
totally different thing entirely
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
Please how can i resolve this issue, it has been taking some days now
I need to deliver the project
Help pls 🙏
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
What do you mean by
Have you opted your routes into the edge runtime
what is did was
I included this line of code in all my page route
export const runtime = "edge";
Buh still not working
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
what do you mean by SSG'd ?
yes, i only install this
npm install --save-dev @cloudflare/next-on-pages
And i discover this on the website (https://blog.cloudflare.com/next-on-pages/)
experimental: {
runtime: 'experimental-edge',
},
can it work for me ?
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
This is the next error log
06:31:43.308 ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
06:31:43.308 ⚡️
06:31:43.309 ⚡️ The following routes were not configured to run with the Edge Runtime:
06:31:43.309 ⚡️ - /[...not_found]
06:31:43.309 ⚡️ - /admin/[[...index]]
06:31:43.309 ⚡️ - /post/[slug]/opengraph-image
06:31:43.309 ⚡️ - /post/[slug]
06:31:43.309 ⚡️
06:31:43.310 ⚡️ Please make sure that all your non-static routes export the following edge runtime route segment config:
06:31:43.310 ⚡️ export const runtime = 'edge';
06:31:43.310 ⚡️
06:31:43.310 ⚡️ You can read more about the Edge Runtime on the Next.js documentation:
06:31:43.310 ⚡️ https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes
06:31:43.310
06:31:43.333 Failed: Error while executing user command. Exited with error code: 1 06:31:43.343 Failed: build command exited with code: 1 06:31:44.308 Failed: error occurred while running build command
06:31:43.333 Failed: Error while executing user command. Exited with error code: 1 06:31:43.343 Failed: build command exited with code: 1 06:31:44.308 Failed: error occurred while running build command
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
okay
i should remove all this path ?
output: ".vercel/output/static",
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
This is my nextconfig file
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: ".vercel/output/static",
experimental: {
appDir: true,
// sanity plugin input request
// esmExternals: 'loose'
},
images: {
// domains: ['cdn.sanity.io'],
// loader: "custom",
// loaderFile: './my-loader.ts',
remotePatterns: [
{
protocol: "https",
hostname: "cdn.sanity.io",
port: "",
},
],
},
};
module.exports = nextConfig;
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
I got this error in the build log after doing this
20:55:03.836 ⚡️ The Vercel build (
20:55:03.860 Failed: Error while executing user command. Exited with error code: 1 20:55:03.873 Failed: build command exited with code: 1 20:55:05.374 Failed: error occurred while running build command
npx vercel build
) command failed. For more details see the Vercel logs above.
20:55:03.837 ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.
20:55:03.83720:55:03.860 Failed: Error while executing user command. Exited with error code: 1 20:55:03.873 Failed: build command exited with code: 1 20:55:05.374 Failed: error occurred while running build command
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
okay Thanks
i will implement and feedback
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
These is my log build
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/10/2023 in #next-on-pages
.
Yeah thanks very much for the support
Where i have issues is only the page slug page like sanity embedded studio app/admin, post/slug and the images that are not showing
Have tried using "npx next build" locally, and use "npx serve@latest out" to run , the post slug page and the images
These are the configurations i did
Am using nextjs static export for deployment
so i configured my nextjs.config.js as follows
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: "export",
experimental: {
appDir: true,
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "cdn.sanity.io",
port: "",
},
],
},
};
module.exports = nextConfig;
Then, have tried using only
domains: ['cdn.sanity.io'], in the image object is not still working
I will await your response thanks 🙏
29 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/8/2023 in #pages-help
Images are not showing after deployment
Please what do you mean by CF ?
11 replies
CDCloudflare Developers
•Created by Rasheeddev on 10/8/2023 in #pages-help
Images are not showing after deployment
I have done the settings.
i deployed to vercel everything works well
11 replies