Download next.js/errors/can-not-output-to-public.mdx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 476 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/errors/can-not-output-to-public.mdx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/errors/can-not-output-to-public.mdx
-
curl -L -o can-not-output-to-public.mdx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/errors/can-not-output-to-public.mdx
476 Bytes
| title: Cannot output to /public | |
| ## Why This Error Occurred | |
| Either you set `distDir` to `public` in your `next.config.js` or during `next export` you tried to export to the `public` directory. | |
| This is not allowed because `public` is used by Next.js to serve static assets. | |
| ## Possible Ways to Fix It | |
| Use a different `distDir` or export to a different folder. | |
| ## Useful Links | |
| - [Static file serving docs](/docs/pages/api-reference/file-conventions/public-folder) | |