capacitor icon indicating copy to clipboard operation
capacitor copied to clipboard

[Bug]: `yarn cap run` fails with yarn 4 - SyntaxError: Unexpected token 'E', "Error: spawn ENOTDIR"

Open conlanpatrek opened this issue 2 years ago • 3 comments

Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.7.0 @capacitor/core: 5.7.0 @capacitor/android: 5.7.0 @capacitor/ios: 5.7.0

Installed Dependencies:

@capacitor/ios: not installed @capacitor/cli: 5.7.0 @capacitor/core: 5.7.0 @capacitor/android: 5.7.0

Other API Details

npm: 10.2.4
node: v21.6.1
pod: 1.11.3
yarn: 4.1.0

Platforms Affected

  • [X] iOS
  • [X] Android
  • [ ] Web

Current Behavior

Detail and full reproduction is in the linked repo, but:

Init an empty repository with yarn 4 (making sure the output of yarn --version isn't 1.x.x)

Go through the "Getting started" guide here and here using yarn instead of npm.

Try running yarn cap run android and see the stack trace generated

Expected Behavior

I expect yarn cap run android to run the simulator, but it does not.

Project Reproduction

https://github.com/conlanpatrek/capacitor-yarn-bug

Additional Information

I've seen several ghosts of this same issue opened and closed in the past couple of years in this repo, basically since yarn 2, but a lot of them were hit-and-runs that never got resolved. Hoping the minimum recreation helps.

I'm running macOS 14.2.1.

conlanpatrek avatar Feb 25 '24 21:02 conlanpatrek

Following up. Are you having an okay time with the reproduction? Lmk if you need more info, or if yarn support > v1 is not on the table at all. I've already downgraded to work around the issue so I'm not hurting over here. 👍

conlanpatrek avatar Mar 03 '24 06:03 conlanpatrek

This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.

ionitron-bot[bot] avatar Jun 25 '24 14:06 ionitron-bot[bot]