Fen*_*ndy 6 javascript reactjs webpack babeljs next.js
我通过使用 NextJS 文档中的引用在 NextJS 中使用重写时出现错误
我尝试重新安装 node_modules 但它仍然不起作用
环境变量正在工作,但重写功能不起作用
这是我的 next.config.js
module.exports = {
env: {
APPNAME: 'NextJS Exercise!!!',
},
async rewrites() {
return [
{
source: '/login',
destination: '/auth/login',
},
]
},
}
Run Code Online (Sandbox Code Playgroud)
这是我得到的错误
TypeError: (0 , _resolveRewrites.default) is not a function
Mic*_*ung 13
我之前在一个干净的 nextjs 项目中遇到过这个问题。
有一个快速修复方法:
npm install
再次。如果上述方法无法帮助您,请尝试将nextjs包升级到10.2.0
,
npm install next@latest
归档时间: |
|
查看次数: |
6205 次 |
最近记录: |