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

Causes an error when any folder in the path starts with "ud" #36078

Closed
1 task done
EnderWolf50 opened this issue Apr 12, 2022 · 23 comments
Closed
1 task done

Causes an error when any folder in the path starts with "ud" #36078

EnderWolf50 opened this issue Apr 12, 2022 · 23 comments
Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application. locked

Comments

@EnderWolf50
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.13.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant packages:
  next: 12.1.5-canary.6
  react: 18.0.0
  react-dom: 18.0.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

pnpm run dev

Describe the Bug

As the title says, I found that I could not successfully run the project using pnpm run dev or yarn run dev when any of the folders in the path started with "ud".

I've tested this on two computers (both windows) and I get the same error, here is what I got:

> ud-test@0.1.0 dev D:\Dev\ud-test
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
wait  - compiling...
error - ./node_modules/.pnpm/next@12.1.5-canary.6_react-dom@18.0.0+react@18.0.0/node_modules/next/dist/client/dev/amp-dev.js
Module not found: Can't resolve 'D:\Devud-test\node_modules\.pnpm\next@12.1.5-canary.6_react-dom@18.0.0+react@18.0.0\node_modules\next\dist\compiled\regenerator-runtime\runtime.js' in 'D:\Dev\ud-test\node_modules\.pnpm\next@12.1.5-canary.6_react-dom@18.0.0+react@18.0.0\node_modules\next\dist\client\dev'

Expected Behavior

Dev server normally runs up.

To Reproduce

  • run pnpm create next-app to create a project name that starts with "ud".
  • pnpm run dev or yarn run dev
@EnderWolf50 EnderWolf50 added the bug Issue was opened via the bug report template. label Apr 12, 2022
@balazsorban44
Copy link
Member

This sounds similar to #34000, but I cannot find any ud-like RegExp in our code. 🤔

I can also not reproduce it on my (Linux) machine.

Could you try npx create-next-app and yarn create next-app to verify it's not a pnpm specific issue?

From the error: D:\Devud-test is there a \ missing? I wonder what's happening there.

@balazsorban44 balazsorban44 added type: needs investigation create-next-app Related to our CLI tool for quickly starting a new Next.js application. labels Apr 12, 2022
@EnderWolf50
Copy link
Author

I can also not reproduce it on my (Linux) machine.

Maybe it's a Windows special case? I can't test it because I don't have Linux on hand as my development environment.

Could you try npx create-next-app and yarn create next-app to verify it's not a pnpm specific issue?

I've tested both npx create-next-app and yarn create next-app, and both of them gave me the same error.
(Not post the error codes here because they are exactly the same.)

From the error: D:\Devud-test is there a \ missing? I wonder what's happening there.

Not sure what's going on there. 🤔
Whenever I have a folder in my path that starts with ud and run a development command, the \ in front of ud is automatically eliminated.

Here are the error codes, even though they are the same as the one at the beginning:

> my-app@0.1.0 dev D:\Dev\deep\nested\folder\statswith\ud\my-app
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
wait  - compiling...
error - ./node_modules/.pnpm/next@12.1.4_react-dom@18.0.0+react@18.0.0/node_modules/next/dist/client/dev/amp-dev.js
Module not found: Can't resolve 'D:\Dev\deep\nested\folder\statswithud\my-app\node_modules\.pnpm\next@12.1.4_react-dom@18.0.0+react@18.0.0\node_modules\next\dist\compiled\regenerator-runtime\runtime.js' in 'D:\Dev\deep\nested\folder\statswith\ud\my-app\node_modules\.pnpm\next@12.1.4_react-dom@18.0.0+react@18.0.0\node_modules\next\dist\client\dev'

@homfred
Copy link

homfred commented Apr 18, 2022

I've experienced this on Windows as well when I had a folder that started with "ud" in the path. In my case I utilized this command to create the next app:

npx create-next-app
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro (10.0.19043 Build 19043)
Binaries:
  Node: 16.14.2
  npm: 8.5.0
  Yarn: N/A
  pnpm: N/A
Relevant packages:
  next: 12.1.5
  react: 18.0.0
  react-dom: 18.0.0

Error that occurred:

$ npm run dev

> next-js-tutorial@0.1.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
wait  - compiling...
error - ./node_modules/next/dist/client/dev/amp-dev.js
Module not found: Can't resolve 'E:\codeudemy\next-js-tutorial\node_modules\next\dist\compiled\regenerator-runtime\runtime.js' in 'E:\code\udemy\next-js-tutorial\node_modules\next\dist\client\dev'

When I reverted to next 12.1.0 and react 17.0.2 it worked again.

@EnderWolf50
Copy link
Author

EnderWolf50 commented Apr 18, 2022

Forgot to mention this, when I rolled back the next.js versions to <12.0.4, they all worked fine.

I think it might be some change in 12.0.4 that is causing the problem?

@sdbxsdb
Copy link

sdbxsdb commented Apr 22, 2022

I can also confirm that with React 18 and Next 12.1.5 that you cannot start a project with 'ud'.

Every other scenario is fine but this combination will not allow a dev server to start.
Renaming the project worked perfectly fine.

@jonrynn
Copy link

jonrynn commented May 3, 2022

It worked when I didn't use udemy -- seriously, someone wrote next.js so you can't have udemy in the folder name?

@balazsorban44
Copy link
Member

Anyone who can reproduce this issue and say that it worked in previous versions, could you bisect and find the exact canary release? That would help us pinpoint the PR that introduced the issue. You can see the full list of releases here: https://github.com/vercel/next.js/releases

@ryanadhi
Copy link

I am facing same issue since yesterday, it misses \ on the red mark and I can confirm it only fails when the next folder starts with ud...

Screenshot 2022-06-23 120846
Screenshot 2022-06-23 121021

   Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home Single Language
    Binaries:
      Node: 16.13.2
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 12.1.6
      react: 18.2.0
      react-dom: 18.2.0 

@ryanadhi
Copy link

@balazsorban44 I tried several releases and the oldest I tried https://github.com/vercel/next.js/releases/tag/v12.0.8-canary.10

the issue also occurred

@dewald-els
Copy link

Same issue occurred for me, Had the folder initially named udemy-next-auth, I then changed it to next-auth-section and it worked.

@Martin0619
Copy link

I did experience the same. I created a next project with all 3 options yarn, pnpm & npx, and none of them worked when I had a folder named udemy.com. It only worked for me when I renamed the folder. Btw I'm currently using Windows 11.

Binaries:
Node: v18.4.0
pnpm: 7.5.1
yarn: 1.22.19
npm: 18.12.2

package.json:
"next": "12.2.2",
"react": "18.2.0",
"react-dom": "18.2.0"

@andreagodoshian
Copy link

oh. my. gosh. this is the error!!!!! i was going insane 😂👍 for the record, i am a windows user (please don't shun me).

thank you 🙏🖤

@johanroug
Copy link

really weird. My project was in a folder called "udemy".
renaming the folder to something without ud worked

@atlamors
Copy link

+1

 
Module not found: Error: Can't resolve './node_modules/next/dist/client/dev/amp-dev' in '/mnt/data/home/901934.cloudwaysapps.com/zknepprnye/public_html'

hskwakr added a commit to hskwakr/misc-react that referenced this issue Feb 22, 2023
@TimFL
Copy link

TimFL commented May 30, 2023

Is there no work being done on this?

Found this issue being linked here: #37508
I have the exact same error as issue 37508 with the difference being, that none of my paths contain "ud" anywhere. Is there no workaround for this yet?

Next@13.4.2 is the last release that worked for me, 13.4.3 upwards (up to latest canary 13.4.5-canary0) keep throwing the amp-dev and fallback-build-manifest.json errors in console, completely nuking my project.

Tried the following things:

  • With and without nodeLinker: node-modules in yarnrc
  • yarn cache clear & reinstall
  • Nuke .next folder (multiple times)
  • swcFileReading: false in experimental settings
  • Remove all spaces from absolute filepath
  • Double check all folders for "ud" in them, there are none

@simonknittel
Copy link

simonknittel commented May 30, 2023

I'm having a similar if not the same issue.

After upgrading to 13.4.4 I'm getting the error Error: Filesystem cache is not enabled, cannot read plugin from phsyical path when running npm run build (btw note the typo in phsyical).

When running npm run dev the error looks like this: Error: Cannot find module '/Users/simon.knittel/Documents/hmmh/snivy/app/.next/fallback-build-manifest.json'

As far as I can see, there is no ud in that path or anywhere in my filenames.

This also happens on our Jenkins.

However, in contrast to @TimFL, only 13.4.4 is broken for me. Downgrading to 13.4.3 reverts the issue.

@TimFL
Copy link

TimFL commented May 31, 2023

I'm having a similar if not the same issue.

After upgrading to 13.4.4 I'm getting the error Error: Filesystem cache is not enabled, cannot read plugin from phsyical path when running npm run build (btw note the typo in phsyical).

When running npm run dev the error looks like this: Error: Cannot find module '/Users/simon.knittel/Documents/hmmh/snivy/app/.next/fallback-build-manifest.json'

As far as I can see, there is no ud in that path or anywhere in my filenames.

This also happens on our Jenkins.

However, in contrast to @TimFL, only 13.4.4 is broken for me. Downgrading to 13.4.3 reverts the issue.

I've been getting this error for a while now but I kept quiet, thinking that 13.4.4/5 would fix it (just like previous releases fixed most issues I had) but there's been no change to this and I'm starting to get uneasy cause my codebase is big (all-in on App Router / Next 13) at work and that'd be catastrophic if I'm now forever stuck on 13.4.2...

Is there any debug info we can help out with or get the developers attention to this issue? It being open for over a year is no good sign.

//EDIT: I spent a few hours troubleshooting with blank project setups, this issue seems to be caused by using experimental swcPlugins in next.config (@lingui/swc-plugin). After I remove that plugin (emptying my swcPlugins), the error disappears and I can launch the app without any issues. Tested on both my current project and a blank create-next-app with all my dependencies installed.

//EDIT 2: Seems to be tied to @lingui/swc-plugin (see compatibility note: https://github.com/lingui/swc-plugin#compatibility), should be resolved with 4.0.1 once that works with Nextjs 13.4.3 onwards. I'll report back.

@timheerwagen
Copy link

I'm having a similar if not the same issue.

After upgrading to 13.4.4 I'm getting the error Error: Filesystem cache is not enabled, cannot read plugin from phsyical path when running npm run build (btw note the typo in phsyical).

When running npm run dev the error looks like this: Error: Cannot find module '/Users/simon.knittel/Documents/hmmh/snivy/app/.next/fallback-build-manifest.json'

As far as I can see, there is no ud in that path or anywhere in my filenames.

This also happens on our Jenkins.

However, in contrast to @TimFL, only 13.4.4 is broken for me. Downgrading to 13.4.3 reverts the issue.

Getting the same issue with
swcPlugins: [["next-superjson-plugin", {}]], and next 13.4.4

@thekip
Copy link

thekip commented Jun 1, 2023

tracking PR: #50651

@AkifumiSato
Copy link
Contributor

This problem also occurs when running examples/hello-world.
Is there any progress?

@karlkras
Copy link

Why is this still open? Isn't it fixed in v14^?

@samcx
Copy link
Member

samcx commented Feb 28, 2024

Hi everyone,

I was not able to replicate this in the latest, and it is unlikely this is still an issue.

I will be closing this issue in the meantime!

@samcx samcx closed this as completed Feb 28, 2024
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. 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 Mar 13, 2024
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. create-next-app Related to our CLI tool for quickly starting a new Next.js application. locked
Projects
None yet
Development

No branches or pull requests