Skip to content

Commit

Permalink
fix: add troubleshooting for yarn enoent error (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh authored Feb 12, 2024
1 parent 850ecec commit eb990a2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/developer/trouble-shooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ If you find a solution about a problem you faced, please let us know so we can a

Run `yarn` at the root of the project (same level as the package.json file). You should see a `node_modules` folder get generated.

## No such file or directory when running `yarn`

When you run `yarn` and you get an error similar to:

```
Internal Error: ENOENT: no such file or directory, stat '/Users/<path-to-directory>/.yarn/releases/yarn-4.1.0.cjs'
```

This usually means you do not have the yarn executable at the path defined in `.yarnrc.yml` under the `yarnPath` key.

To solve this issue:
1. Comment out the `yarnPath` key in `.yarnrc.yml`
2. Run `yarn set version latest` at the root of the project. This assumes you have yarn available globally (installed using corepack as recommended).
3. Run `yarn`, everything should be fine. Ensure that the `.yarn/releases` folder is commited to source control to remove issues like these in the future. See which files should be ignored in [the Yarn Q&A](https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored)

## CORS error with app

Apps need to be registered with a corresponding publisher. Publisher decides which origins are allowed.
Expand Down

0 comments on commit eb990a2

Please sign in to comment.