admin管理员组文章数量:1425794
I recently installed Nextjs v12. I created some Api routes (for example "/api/products"). these routes work correctly, but when I make concurrentFeatures: true
in next.config.ts
, Api routes don't work. the displayed error in console is error - Error: Cannot find module for page: /api/products
here is my next.config.ts
file content:
module.exports = {
reactStrictMode: true,
experimental: {
concurrentFeatures: true
}
}
here are my directories:
pages
----api
--------products
------------index.ts
I recently installed Nextjs v12. I created some Api routes (for example "/api/products"). these routes work correctly, but when I make concurrentFeatures: true
in next.config.ts
, Api routes don't work. the displayed error in console is error - Error: Cannot find module for page: /api/products
here is my next.config.ts
file content:
module.exports = {
reactStrictMode: true,
experimental: {
concurrentFeatures: true
}
}
here are my directories:
pages
----api
--------products
------------index.ts
Share
Improve this question
edited Nov 5, 2021 at 13:40
Reza Mirzapour
asked Nov 5, 2021 at 8:26
Reza MirzapourReza Mirzapour
4434 silver badges12 bronze badges
1 Answer
Reset to default 5I searched nextjs issues in github and found this issue: https://github./vercel/next.js/issues/30586
this issue is already open and labeled as a bug. so this is a bug of nextjs and probably will be fixed in the future.
-- UPDATE --
now the https://github./vercel/next.js/issues/30586 issue is closed. in nextjs v12.0.4-canary.3 and higher, this problem is fixed
本文标签:
版权声明:本文标题:javascript - Nextjs 12: why activation experimental react concurrent features will disable API routes? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745449852a2658833.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论