ilovemesomeramen
ilovemesomeramen
CDCloudflare Developers
Created by ilovemesomeramen on 4/4/2025 in #workers-help
Private NPM registry install does not work on Worker Builds
I'm not quite sure what the issue is but there appears to be one. I setup my workers build exactly the same as my pages build with an NPM_TOKEN set in the build env. However sometimes the build fails with ''' npm error 404 Not Found - GET https://gitlab.com/api/v4/projects/#####/packages/npm/@####/###/-/@#####/###-#.#.##.tgz - Project not found npm error 404 npm error 404 '@######/###@https://gitlab.com/api/v4/projects/#####/packages/npm/@#####/###/-/@####/###-#.#.##.tgz' is not in this registry. ''' Sometimes the build works even if i change nothing, maybe the build cache is shared between pages and worker builds? and it gets the version from there when the pages build completes with the same package version? But is is also not reliable so i'm not quite sure what the problem is. Once the build works one time with a version it continues to work with that version, most likely due to the build cache? any help would be appreciated
1 replies
CDCloudflare Developers
Created by ilovemesomeramen on 3/11/2025 in #pages-help
[NextOnPages] cloudflare does not cache anything
The documentation still specifies ways to setup NextJs on cloudflare such that requests are cached. But it appears this is no longer the case (compat date 2024-11-11), no fetch requests i make are being cached. the documentation mentions nothing of this. https://developers.cloudflare.com/pages/framework-guides/nextjs/ssr/caching/ is there any workaround for this? related github issue: https://github.com/cloudflare/next-on-pages/issues/799
11 replies
CDCloudflare Developers
Created by ilovemesomeramen on 7/1/2024 in #pages-help
next-on-pages data caching does not work
Related to: https://github.com/cloudflare/next-on-pages/issues/799 Data which is fetched via the 'fetch' function is not cached, and gets re-fetched every page load regardless of the values of 'revalidate' or 'tags'. Building and running the next application locally with: npx @cloudflare/next-on-pages and npx wrangler pages dev .vercel/output/static --compatibility-flag=nodejs_compat results in following error on page load:
✘ [ERROR] workerd/jsg/util.c++:278: error: e = kj/async-io-unix.c++:1299: failed: DNS lookup failed.; params.host = internal_suspense_cache_hostname.local; params.service = ; gai_strerror(status) = Temporary failure in name resolution

stack:
/home/dev/tmp/fetch-test/node_modules/@cloudflare/workerd-linux-64/bin/workerd@586542c
[...]
/home/dev/tmp/fetch-test/node_modules/@cloudflare/workerd-linux-64/bin/workerd@35e19fc;
sentryErrorContext = jsgInternalError


✘ [ERROR] workerd/jsg/util.c++:278: error: e = kj/async-io-unix.c++:1299: failed: DNS lookup failed.; params.host = internal_suspense_cache_hostname.local; params.service = ; gai_strerror(status) = Temporary failure in name resolution

stack:
/home/dev/tmp/fetch-test/node_modules/@cloudflare/workerd-linux-64/bin/workerd@586542c
[...]
/home/dev/tmp/fetch-test/node_modules/@cloudflare/workerd-linux-64/bin/workerd@35ae5c0;
sentryErrorContext = jsgInternalError


✘ [ERROR] Uncaught (async) Error: internal error


[wrangler:inf] GET / 200 OK (353ms)
✘ [ERROR] workerd/jsg/util.c++:278: error: e = kj/async-io-unix.c++:1299: failed: DNS lookup failed.; params.host = internal_suspense_cache_hostname.local; params.service = ; gai_strerror(status) = Temporary failure in name resolution

stack:
/home/dev/tmp/fetch-test/node_modules/@cloudflare/workerd-linux-64/bin/workerd@586542c
[...]
/home/dev/tmp/fetch-test/node_modules/@cloudflare/workerd-linux-64/bin/workerd@35e19fc;
sentryErrorContext = jsgInternalError


✘ [ERROR] workerd/jsg/util.c++:278: error: e = kj/async-io-unix.c++:1299: failed: DNS lookup failed.; params.host = internal_suspense_cache_hostname.local; params.service = ; gai_strerror(status) = Temporary failure in name resolution

stack:
/home/dev/tmp/fetch-test/node_modules/@cloudflare/workerd-linux-64/bin/workerd@586542c
[...]
/home/dev/tmp/fetch-test/node_modules/@cloudflare/workerd-linux-64/bin/workerd@35ae5c0;
sentryErrorContext = jsgInternalError


✘ [ERROR] Uncaught (async) Error: internal error


[wrangler:inf] GET / 200 OK (353ms)
minimal reproducible example https://github.com/ilovemesomeramen/next-on-pages-cache-issue any help would be appreciated!
6 replies