Adds an err.sh link to the production build missing message. Also clears up `valid` as `production`.
Also fixes an edge case where an unhelpful error would be thrown because we checked for `.next` instead of `.next/BUILD_ID`
Added the out directory location as the list line during export to make sure people know where the files are output.
Fixes#19778Fixes#19788
## Why
Some users prefer to use a custom server implementation that handles body parsing. If they do this, they have no way to opt out of all body parsing in API Routes. Requests with bodies die if next's `bodyParser` is not disabled. Requests just hang forever.
Instead of adding [this config](https://nextjs.org/docs/api-routes/api-middlewares#custom-config) to every API Route, we do a simple check to avoid parsing the body twice.
Fixes#8315Fixes#7960
Nitpicky change, but the version string contained a double `|`, implying that there might be an empty value between `process.env.__NEXT_VERSION` and the environment variables.
This PR removes the `next.config.js` file with an `env` key and instead modifies the setup script to create a `.env.local` file with the provided credentials.
I also made some changes to the Deploy Button to ask for the environment variables when creating a new project.
## Problems with the other implementation
- pixel not working first time load page (this generate fake information to facebook analytics data)
- package react-facebook-pixel error when try use events in code blocks or other pages with the current implementation
- sometimes pixel mark twice pageview (this generate warning in facebook panel)
- standar or custom events not working
## Solutions
- Initialize pixel when entering each page (_document)
- Now, we can use custom and standar events (utils/fpixel.js)
- correct way to implement pixel according to facebook and guide facebook to implement in SPA
- this solution is complemented with example "with-google-analytics"
In my opinion, the other development has problems, but I preferred created a new example because the way to implement the base code is different. It seems that the other example is based on set the events from the Facebook control panel then this method limits an advanced implementation.
We've received some feedback that the current note about calling API routes inside gSP/gSSP is confusing. This updates the wording to make it clear you can still use `fetch` in your application, and also to not say you "import" an API route. You import the _logic_ inside the route.
* make the error message more clear if webpack config comes back undefined
* Update check and add test
* bump
* Update build-output test
Co-authored-by: JJ Kasper <jj@jjsweb.site>
This reverts #18921 and ensures that the Babel runtime is only inlined as an absolute path when using PnP as before, but then including the correction this resolution as implemented by @merceyz only in the PnP cases, while keeping the diff to a minimum.
Hello, this PR updates the with-tailwindcss-emotion example to be compatible with tailwindcss 2.0
Here is a summary of all the changes:
- update `.babelrc` config
- update `README.md`
- delete `@emotion/css component` (makes the example simpler)
- update `@emotion/react` component to use xwind
- update `@emotion/styled` component to use xwind
- Add global styles to `_app.js`
- remove `_document.js` page
- remove `base.css` global style files (global styles are added in _app.js)
- update `tailwind.config.js`
- update `package.json` dependencies + remove unnecessary `build:base-css` script
By default, MobX 6 and later require that you use `actions` to make changes to the state, otherwise, it issues a warning in the console, because the `hydrate` method of the `store.js` class hasn't been declared an action, you can see this warning if you try to load pages that use hydration (ssg, ssr).
This pull request fixes that.
More info about the behavior:
https://mobx.js.org/actions.html#disabling-mandatory-actions-
Fixes#16173
## What
Restores handling of termination signals, `SIGTERM` and `SIGINT`, to allow graceful termination of next commands. Seems to have been removed during a child process refactor #6450, was this intentional?
## Why
Currently the command processes have to be forcefully killed. This would help those using Next.js with custom servers and tools like Docker and Kubernetes that rely on termination signals to shutdown instances.
---
Where would be a good location to add some tests? [test/integration/cli/test/index.test.js](fc98c13a2e/test/integration/cli/test/index.test.js)?
To clarify what I've noticed as a common source of confusion in discussions online. Fixes https://github.com/vercel/next.js/issues/19426
If you wish to know whether the code is running as part of a client-side page transition, in either `getInitialProps` or `getServerSideProps`, you can check to see if `context.req.url` starts with `/_next/data`.
- Updated some links in docs that don't have the `.md` extension. Not required for our live docs but useful for the GitHub view.
- Updated links that go to https://nextjs.org/docs to a relative path, that way they'll work for versioned docs
- Updated the `Regex Path Matching` example to be consistent with the paragraph above and with the official example in /examples.
For an API route to work, you need to `export as default a function` (a.k.a **request handler**), which then receives the following parameters:
For an API route to work, you need to `export a function as default` (a.k.a **request handler**), which then receives the following parameters:
I might be wrong though (not a native English speaker), it just sounds strange to my ears.