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

Next app errors: ./node_modules/next/dist/client/dev/amp-dev.js and Cannot find module '...fallback-build-manifest.json' #37508

Closed
1 task done
udabasili opened this issue Jun 7, 2022 · 3 comments
Labels
bug Issue was opened via the bug report template.

Comments

@udabasili
Copy link

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Home
Binaries:
Node: 16.14.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 12.1.7-canary.31
react: 18.1.0
react-dom: 18.1.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Basically when I try to run the next.js app created fresh with the create next app command. I get the following error. I should point out though when I run the same command for the same app in the windows public user folder, I get no error. I saw somewhere that ./node_modules/next/dist/client/dev/amp-dev.js error is somehow related to the full file path containing a word starting with ud and my main user folder is called udabasili. But changing the main folder isn't an option since it could potentially break my whole system

info  - Loaded env from C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\.env.local
wait  - compiling...
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'      
wait  - compiling /_error (client and server)...
wait  - compiling...
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:
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\load-components.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\next-server.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\next.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\lib\start-server.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\cli\next-dev.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\bin\next
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.mod._resolveFilename (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\build\webpack\require-hook.js:183:28)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.loadDefaultErrorComponents (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\load-components.js:23:24)
    at DevServer.getFallbackErrorComponents (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\dev\next-dev-server.js:768:43)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async DevServer.renderErrorToResponse (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\base-server.js:1281:40) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\server\\load-components.js',    
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\server\\next-server.js',        
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\server\\next.js',
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\server\\lib\\start-server.js',  
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\cli\\next-dev.js',
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\bin\\next'
  ]
}
Error: Cannot find module 'C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\.next\fallback-build-manifest.json'
Require stack:
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\load-components.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\next-server.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\next.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\lib\start-server.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\cli\next-dev.js
- C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\bin\next
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.mod._resolveFilename (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\build\webpack\require-hook.js:183:28)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.loadDefaultErrorComponents (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\load-components.js:23:24)
    at DevServer.getFallbackErrorComponents (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\dev\next-dev-server.js:768:43)
    at async DevServer.renderErrorToResponse (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\base-server.js:1281:40)
    at async pipe.req.req (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\base-server.js:1225:30)
    at async DevServer.pipe (C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\server\base-server.js:663:25) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\server\\load-components.js',    
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\server\\next-server.js',        
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\server\\next.js',
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\server\\lib\\start-server.js',  
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\cli\\next-dev.js',
    'C:\\Users\\udbasili\\Documents\\Programming\\Acumen Developers\\myportfolio\\node_modules\\next\\dist\\bin\\next'
  ]
}

### Expected Behavior

The app should run fine on the browser. But instead, it crashes with an internal server error

### To Reproduce

Run 

> npm run dev
 or 

> yarn run dev in the root
@udabasili udabasili added the bug Issue was opened via the bug report template. label Jun 7, 2022
@balazsorban44 balazsorban44 added please add a complete reproduction Please add a complete reproduction. bug Issue was opened via the bug report template. and removed bug Issue was opened via the bug report template. please add a complete reproduction Please add a complete reproduction. labels Jun 7, 2022
@balazsorban44
Copy link
Member

Duplicate of #36078

@balazsorban44 balazsorban44 marked this as a duplicate of #36078 Jun 7, 2022
@udabasili
Copy link
Author

I cant just rename my main system folder because it would break my system though. I cant break my windows over one next.js app

@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants