NODE.JS:V16.17.0 NPM:8.15.0 检查了该项目的软件包。json文件并确认了以下相关依赖项:
NEXT:13.4.10 反应:18.2.0 反应:18.2.0 故障排除步骤已经尝试:
demented node_modules目录和重新安装的依赖项。
使用NPM CACHE CACHE CACHE CACHE CACHE -FORCE。 node.js版本的验证兼容性。检查了与全球依赖相互矛盾的检查。 ver ver with package.json脚本的正确性:
“开发”脚本定义为“ Next Dev”。 NPM列表的输出-g- depth = 0(全局依赖关系):
/Users/grace/.npm-global/lib
├── @microsoft/[email protected]
├── @pnp/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config) => {
// config.resolve.alias = {
// '@mui/material': '@mui/joy'
// };
return config
}
}
module.exports = nextConfig
config.resolve.alias
const nextConfig = {
webpack: (config) => {
config.resolve.alias = {
// YOUR CHANGES
// ...
...config.resolve.alias // <-- this fixes the error
};
return config
}
}