Next.js:./node_modules/next/dist/client/dev/amp-dev.js

Ude*_*ili 4 reactjs next.js

我现在尝试使用 Next js 时遇到一个非常严重的问题。无论我使用什么版本,每当我尝试运行 时npm run dev,都会收到以下错误:

error - ./node_modules/next/dist/client/dev/amp-dev.js
Module not found: Can't resolve 'C:\Usersudbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\compiled\regenerator-runtime\runtime.js' in 'C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\client\dev'      
error - Error: Cannot find module 'C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\.next\fallback-build-manifest.json'Require stack:
Run Code Online (Sandbox Code Playgroud)

这实际上是在运行创建下一个应用程序命令之后发生的,因此我不安装任何其他软件包。但意识到的一件事是,当我在 Windows PC 上使用公用文件夹时,不会发生此错误,但当我使用名为的用户文件夹时,udbasili我会收到上述错误。我已经使用 next.js 很长时间了,这是我第一次看到这个错误

Joh*_*srk 6

我遇到了同样的问题,问题是我的项目文件位于以“ud”开头的文件夹中。我的文件夹名称是“udemy”。重命名该文件夹或将项目移到该文件夹​​之外解决了问题