question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yarn upgrade to 9.4.0 fails with ENOTDIR

See original GitHub issue

Problem

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:open
  • Created 2 years ago
  • Reactions:18
  • Comments:8

github_iconTop GitHub Comments

6reactions
CyrilQuandallecommented, Jun 18, 2021

I just had to remove my node_modules, reinstall them and it was solved

5reactions
jamgregorycommented, Aug 18, 2021

This issue seems to be caused by an older(?) version of react-ace having react-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:

[ -f 'node_modules/react-ace/dist/react-ace.min.js' ] && rm -rf node_modules/react-ace && yarn install
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found