yarn upgrade to 9.4.0 fails with ENOTDIR
See original GitHub issueProblem
Upgrading react-ace
from 9.3.0 to 9.4.0 fails if using yarn
. Apparently one of the paths in node_modules/react-ace
changed from file to dir. Erasing node_modules
and reinstalling dependencies seems to fix the issue, but is not ideal (multiple devs machines, CI cache, etc.).
yarn upgrade v1.22.5
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
error An unexpected error occurred: "ENOTDIR: not a directory, lstat '/...../node_modules/react-ace/dist/react-ace.min.js/main.js.LICENSE.txt'".
Sample code to reproduce your issue
yarn init
yarn add react-ace@9.3.0 react react-dom
yarn upgrade react-ace@9.4.0
References
Progress on: #
Issue Analytics
- State:
- Created 2 years ago
- Reactions:18
- Comments:8
Top Results From Across the Web
Error Codes | Yarn - Package Manager
This error means that this process failed and Yarn cannot successfully figure out which version of the package should be added to your...
Read more >react-ace - Bountysource
Upgrading react-ace from 9.3.0 to 9.4.0 fails if using yarn . Apparently one of the paths in node_modules/react-ace changed from file to dir....
Read more >npm - Why does "yarn install" raise an ENOENT error when ...
lock file. Please keep in mind that afterward, all libraries will get updated to the latest versions according to the rules you specified...
Read more >Update our yarn dev dependencies to the extent allowed by ...
package name old version(s) new version(s)
@babel/code‑frame, 7.15.8, 7.16.7
@babel/compat‑data 7.15.0 7.17.0
@babel/core 7.15.8 7.17.0
Read more >How to Install Yarn on Ubuntu {With Screenshots} - phoenixNAP
Create a New Yarn Project · Add a Dependency to Your Project · Upgrade a Yarn Dependency · Remove a Yarn Dependency ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just had to remove my node_modules, reinstall them and it was solved
This issue seems to be caused by an older(?) version of
react-ace
havingreact-ace.min.js
as a file, not a folder. Seemingly during the upgrade the old file isn’t removed, which is why this is failing.Our simplest fix was to check for the existence of that file and remove
react-ace
before reinstalling: