Skip to content

[Bug] Error: ENOTDIR: not a directory, rmdir './node_modules' #4326

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

Closed
1 task done
joker-777 opened this issue Apr 5, 2022 · 7 comments
Closed
1 task done

[Bug] Error: ENOTDIR: not a directory, rmdir './node_modules' #4326

joker-777 opened this issue Apr 5, 2022 · 7 comments
Labels
bug Something isn't working node-modules

Comments

@joker-777
Copy link

joker-777 commented Apr 5, 2022

Self-service

  • I'd be willing to implement a fix

Describe the bug

Because of our deployment process, we have multiple folders which should share the same node_modules folder. Unfortunately, yarn 3.2.0 doesn't support that the node_modules is a soft link.

yarn
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ js-tokens@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ loose-envify@npm:1.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ react-dom@npm:18.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ react@npm:18.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ scheduler@npm:0.21.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0001: │ Error: ENOTDIR: not a directory, rmdir '/home/user/test_app/app/node_modules'
➤ YN0000: └ Completed
➤ YN0000: Failed with errors in 0s 113ms

To reproduce

git clone https://github.com/joker-777/test_app
cd test_app/app
yarn

Environment

System:
    OS: Linux 5.11 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (4) x64 Intel(R) Xeon(R) CPU @ 2.80GHz
  Binaries:
    Node: 14.18.2 - /tmp/xfs-5e35bc1d/node
    Yarn: 3.2.0 - /tmp/xfs-5e35bc1d/yarn
    npm: 6.14.15 - /usr/bin/npm
  npmPackages:
    jest: ^27.5.1 => 27.5.1

Additional context

No response

@joker-777 joker-777 added the bug Something isn't working label Apr 5, 2022
@larixer
Copy link
Member

larixer commented Apr 6, 2022

Duplicate of #4172, fixed via: #4206 in master, to verify, run:
yarn set version from sources
and then
yarn

@larixer larixer closed this as completed Apr 6, 2022
@joker-777
Copy link
Author

@larixer Thanks, this definitely fixed the error but there is still a problem. It still creates a new node_modules folder instead of using the existing sumlink to our shared node_modules folder.

@larixer larixer reopened this Apr 6, 2022
@larixer
Copy link
Member

larixer commented Apr 6, 2022

@joker-777 Hmm, okay, I see that something is not right, I will take a look and reply later.

@joker-777
Copy link
Author

@larixer I'm updating right now my example app and there it somehow works. I'll keep investigating.

@joker-777
Copy link
Author

@larixer Sorry for may false alarm. Everything works. Do know when you guys will publish a new version?

@arcanis
Copy link
Member

arcanis commented Apr 6, 2022

@larixer Sorry for may false alarm. Everything works. Do know when you guys will publish a new version?

We're currently working on the next major, and cherry-picks are reserved to critical bugfixes. Will take some time.

@merceyz
Copy link
Member

merceyz commented May 13, 2022

The fix has been backported and released in v3.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node-modules
Projects
None yet
Development

No branches or pull requests

4 participants