bloushi
bloushi
CDCloudflare Developers
Created by bloushi on 5/14/2024 in #pages-help
Debugging a deploy issue in a Remix + Vite Project
I have completely removed react-email from the vite project. The deployed project with Tailwind wouldn't complete deployment as startup time exceeds limits. My strategy for now, let it rest for a week, and revisit next week. I'll update the packages and try again. Lets hope for the best. Love Remix, CF and Vite, so I will have to make this work. Thanks @Adi for your help 🙏
13 replies
CDCloudflare Developers
Created by bloushi on 5/14/2024 in #pages-help
Debugging a deploy issue in a Remix + Vite Project
I know it is possible, I have a smaller remix vite project live without issues, this one is a larger project, and its difficult to incrementally break into smaller pieces and test deployment. Better logs would have definitely helped. One other thing that I noticed is that react-email package works with the classic compiler, but when added to the vite project, the project wont deploy, as startup time exceeds the allowed limits. I have removed the react-email package and plan to move it to a separate email service.
13 replies
CDCloudflare Developers
Created by bloushi on 5/14/2024 in #pages-help
Debugging a deploy issue in a Remix + Vite Project
I have tried both, vite dev and wrangler pages dev. Both work fine locally
13 replies
CDCloudflare Developers
Created by bloushi on 5/14/2024 in #pages-help
Debugging a deploy issue in a Remix + Vite Project
Thanks @Adi, value feedback. My _routes.json and _headers.json looks very similar to what you have shared, just extra additions as required. The projects works perfect locally, I have no idea why the project builds and deploys successfully, but then all requests just return an "Internal Error", with no logs at all. Its a bit frustrating, debugging this issue has become like shooting in the dark, Cloudflare needs better logging, and some more love for CF pages.
13 replies
CDCloudflare Developers
Created by bloushi on 5/14/2024 in #pages-help
Debugging a deploy issue in a Remix + Vite Project
Thanks @James, my bad, I didnt mention that I have tested the code locally, and made a few changes to make it compatible with vite config. It will be nothing short of a miracle for my code to work directly on production with local testing 😆 The issue I am facing right now is my code runs perfect locally, no issues, but doesnt work at all when deployed. The build and deployment is successful, the "wrangler tail" command shows me just two requests that are OKs. Other than that, there are no logs, and I have no idea what is failing.
13 replies
CDCloudflare Developers
Created by squareclamp on 3/16/2024 in #workers-help
Debugging Script startup exceeded CPU time limit.
Cool, will try that. Thanks
6 replies
CDCloudflare Developers
Created by squareclamp on 3/16/2024 in #workers-help
Debugging Script startup exceeded CPU time limit.
Hi @squareclamp Were you able to fix this issue? I am facing similar problems when trying to move my Pages project to vite. My project deploys without any issues using the old build system, but the vite project keeps giving me the following error:
Error: Failed to publish your Function. Got error: Error: Script startup exceeded CPU time limit.
Error: Failed to publish your Function. Got error: Error: Script startup exceeded CPU time limit.
Following is my vite config:
export default defineConfig({
plugins: [
remixCloudflareDevProxy({ getLoadContext }),
remix({
ignoredRouteFiles: ["**/*.css"],
}),
tsconfigPaths(),
],
assetsInclude: ["**/*.md"],
ssr: {
noExternal: [],
optimizeDeps: {
// exclude: ["bcryptjs"],
},
target: "webworker",
resolve: {
conditions: ["workerd", "worker", "import", "module", "browser", "default"],
},
},
build: {
minify: "esbuild",
},
});
export default defineConfig({
plugins: [
remixCloudflareDevProxy({ getLoadContext }),
remix({
ignoredRouteFiles: ["**/*.css"],
}),
tsconfigPaths(),
],
assetsInclude: ["**/*.md"],
ssr: {
noExternal: [],
optimizeDeps: {
// exclude: ["bcryptjs"],
},
target: "webworker",
resolve: {
conditions: ["workerd", "worker", "import", "module", "browser", "default"],
},
},
build: {
minify: "esbuild",
},
});
Any hints on how you were able to get around this issue? Thanks.
6 replies