Skip to content
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

yarn dev時にエラーが出ている #401

Open
tyokinuhata opened this issue Sep 18, 2024 · 1 comment
Open

yarn dev時にエラーが出ている #401

tyokinuhata opened this issue Sep 18, 2024 · 1 comment

Comments

@tyokinuhata
Copy link
Member

tyokinuhata commented Sep 18, 2024

 ⨯ API Routes cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export

一応、動作には問題ないが、 next.config.js において、 output: export オプションを指定して静的HTMLエクスポートを行っている場合にはAPI Routesが利用できないが、 src/api 配下にファイルを置いているからエラーが出ていると思われる

Re:gretと連携することを考えるとこのオプションは適切でない可能性?

@tyokinuhata
Copy link
Member Author

⚠ Statically exporting a Next.js application via `next export` disables API routes and middleware.
This command is meant for static-only hosts, and is not necessary to make your application static.
Pages in your application without server-side data dependencies will be automatically statically exported by `next build`, including pages powered by `getStaticProps`.
Learn more: https://nextjs.org/docs/messages/api-routes-static-export

yarn build 時にも同様の警告が出ている

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant