Skip to content

Commit

Permalink
Document file lock workaround for VSCode Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Siegel committed May 14, 2019
1 parent 43e9f1f commit bc457c1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,18 @@ Next, get the code:
#### Making the switch
If you have previously worked in this repo using the `npm` workflow, the first time you switch to using Rush you should commit or stash any untracked files and then get back to a clean state by running `rush reset-workspace` before proceeding any further. This will get rid of any latent package-lock files, as well as your existing (incompatible) node_modules directories. You can then proceed down the path outlined below.

#### Warning for VSCode users
#### Warnings for VSCode users
Visual Studio Code has a feature which will automatically fetch and install @types packages for you, using the standard npm package manager. This will cause problems with your node_modules directory, since Rush uses PNPM which lays out this directory quite differently. It's highly recommended that you ensure "Typescript: Disable Automatic Type Acquisition" is checked in your VSCode Workspace Settings (or ensure `typescript.disableAutomaticTypeAcquisition` is present in your .vscode/settings.json file).

#### Warning for Windows users
The current version of VSCode for Windows has a bug that may cause a "file locked" error when you run any Rush command that modifies your node_modules directory:
```
ERROR: Error: Error: EPERM: operation not permitted, mkdir 'C:\XXXXX\node_modules'
Often this is caused by a file lock from a process such as your text editor, command prompt, or "gulp serve"
```

This bug is fixed in the Insiders build of VSCode (1.34), and will be included in the next release. Until then, you can resolve this by running the "Typescript: Restart TS server" command from the Command Palette to release the lock on the files.

#### Warnings for Windows users
Git for Windows has a bug where repository files may be unintentionally removed by `git clean -df` when a directory is locally linked. Because Rush creates local links between packages, you may encounter this. It's highly recommended to use the `rush reset-workspace` command to get your working directory back to a clean state instead. If you prefer to run `git clean -df` manually, you must first run `rush unlink` so that the operation can be performed safely.

### Inner loop developer workflow with Rush
Expand Down

0 comments on commit bc457c1

Please sign in to comment.