You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We have a NextJS app that uses NetlifyCMS as the backend. We have a catch-all [...slug].js that handles generic routes as well as pages that handle specific routes. In both cases, these pages are wrapped in the same _app.js as well as a Layout component that preloads fonts and analytics (you can see this in the head of the /homepass/ route below).
Pages made via file based routing work on production, however pages generated by [...slug].js don't seem to be working. They don't throw a 404, but they also don't load any JS.
These [...slug].js pages work locally running next dev, as well as running next build && next start. They also work as expected when running netlify dev.
It also look like some of the chunks that are present in the html from a local netlify build are not present when hitting the /homepass/shop route. Below is the head from the shop.html file. Note that the chunks aren't present when hitting the route. Similar chunks are present when hitting the /homepass route.
Expected behavior
Pages generated by [...slug].js should exhibit the same behavior as those made by file system specific pages.
Versions
Next.js: 11.0.0
plugin (if installed at fixed version): N/a (uninstalled to use latest on build)
If you're using the CLI to build
OS: Mac
netlify/cli version: 4.4.2
If you're using file-based installation
netlify.toml:
# Settings in the [build] context are global and are applied to all contexts# unless otherwise overridden by more specific contexts.
[build]
# Directory (relative to root of your repo) that contains the deploy-ready# HTML files and assets generated by the build. If a base directory has# been specified, include it in the publish directory path.publish = "out"# Default build command.command = "yarn build"# Directory with the serverless Lambda functions to deploy to AWS.functions = "functions"
[dev]
command = "yarn dev"functions = "functions"framework = "#auto"
The text was updated successfully, but these errors were encountered:
This actually ended up just being an issue with asset optimization. Rereading the Next.js on Netlify docs, we say that Netlify asset optimization can cause build issues. Turning off 'Bundle JS' and 'Minify JS' in our 'Build and Deploy' settings did the trick.
…ons of next (#541)
* test: update simple-app fixture to have clearer route and to use custom 404
* fix: improve parallel route matching when building server cache
---------
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
Describe the bug
We have a NextJS app that uses NetlifyCMS as the backend. We have a catch-all
[...slug].js
that handles generic routes as well as pages that handle specific routes. In both cases, these pages are wrapped in the same_app.js
as well as aLayout
component that preloads fonts and analytics (you can see this in the head of the/homepass/
route below).Pages made via file based routing work on production, however pages generated by
[...slug].js
don't seem to be working. They don't throw a 404, but they also don't load any JS.These
[...slug].js
pages work locally runningnext dev
, as well as runningnext build && next start
. They also work as expected when runningnetlify dev
.To Reproduce
Steps to reproduce the behavior:
Page generated with
/homepass/index.js
: https://60f5f123b56f86000722e3b1--plume-new-shop.netlify.app/homepassPage generated with
[...slug].js
: https://60f5f123b56f86000722e3b1--plume-new-shop.netlify.app/homepass/shopIt also look like some of the chunks that are present in the html from a local
netlify build
are not present when hitting the/homepass/shop
route. Below is thehead
from theshop.html
file. Note that the chunks aren't present when hitting the route. Similar chunks are present when hitting the/homepass
route.Expected behavior
Pages generated by
[...slug].js
should exhibit the same behavior as those made by file system specific pages.Versions
If you're using the CLI to build
If you're using file-based installation
The text was updated successfully, but these errors were encountered: