-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce no nodejs compat flag error page #479
Introduce no nodejs compat flag error page #479
Conversation
🦋 Changeset detectedLatest commit: 4678b4e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🧪 Prereleases are available for testing 🧪 @cloudflare/next-on-pagesYou can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/6430876971/npm-package-next-on-pages-479 @cloudflare/eslint-plugin-next-on-pagesYou can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/6430876971/npm-package-eslint-plugin-next-on-pages-479 |
internal-packages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The page we're using here has quite a few errors on it. I'd personally in-line it in the project so it's versioned with the package, but at the very least, we need to review the content of the page.
yeah good point about including it in the output app itself, I didn't want to include the html in the project's assets but by chatting with @petebacondarwin I understood that the impact it has on the app assets limits is very negligible, so I'm including it there and not having an external deployed app for this. Regarding the errors on the page, I did notice that once I swapped |
This reverts commit f31d605.
…ut (no external deployment)
df7c6b8
to
e945607
Compare
91e21c4
to
30de577
Compare
packages/next-on-pages/src/buildApplication/buildApplication.ts
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
packages/next-on-pages/no-nodejs-compat-flag-static-error-page/assets/index.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some spelling/grammar nits. Thanks for shipping the page with the package directly rather than linking out!
Co-authored-by: Greg Brimble <[email protected]>
@WalshyDev has pointed out to me the fact that our runtime error message:
Error: Could not access built-in Node.js modules. Please make sure that your Cloudflare Pages project has the 'nodejs_compat' compatibility flag set.
is probably not clear and developers don't get enough instructions on what to do, so to improve things I've updated next-on-pages to serve a more descriptive and actionable error page in case of this runtime issue.Result: https://cede2e83.next-nodejs-compat-page-test.pages.dev/