You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe the actual behavior.
On Windows, the install-run-rush.js script fails with the following error if it needs to call the _cleanInstallFolder() function inside install-run.js:
Error: Error cleaning the package install folder
(C:\js\common\temp\install-run\@[email protected]):
Error: EPERM: operation not permitted, rename
'C:\js\common\temp\install-run\@[email protected]\node_modules' ->
'C:\js\common\temp\rush-recycler\install-run-1589914852715'
The first line creates the rushRecyclerFolder, and the second line tries to rename nodeModulesFolder to rushRecyclerFolder. The problem is Windows doesn't allow renaming a folder to an existing folder name.
@octogonz, @iclanton: I can submit a PR for this. Do you prefer fix 1 (rmdir) or fix 2 (rename to subdir)? Are there tests in the repo for install-run.js, so I could add a regression test for this scenario?
Versions
Tool: Rush
Tool Version: 5.19.3
Node Version: 10.20.1
Is this a LTS version? yes
Have you tested on a LTS version? yes
OS: Windows 10
The text was updated successfully, but these errors were encountered:
mikeharder
added a commit
to mikeharder/azure-sdk-for-js
that referenced
this issue
May 19, 2020
- Update pnpm to latest (known to fail on Node 8)
- Reinstall packages with native dependencies after swapping node version
- Delete Rush install folder after swapping node versions
- Workaround for microsoft/rushstack#1878
mikeharder
added a commit
to mikeharder/rushstack
that referenced
this issue
May 20, 2020
Is this a feature or a bug?
Please describe the actual behavior.
On Windows, the
install-run-rush.js
script fails with the following error if it needs to call the_cleanInstallFolder()
function insideinstall-run.js
:Here's an easy way to repro:
I believe the root cause is these two lines:
rushstack/common/scripts/install-run.js
Lines 295 to 296 in 50d6655
The first line creates the
rushRecyclerFolder
, and the second line tries to renamenodeModulesFolder
torushRecyclerFolder
. The problem is Windows doesn't allow renaming a folder to an existing folder name.I see two possible solutions:
rushRecyclerFolder
before the rename:nodeModulesFolder
to a sub-folder underrushRecyclerFolder
. Something like:@octogonz, @iclanton: I can submit a PR for this. Do you prefer fix 1 (rmdir) or fix 2 (rename to subdir)? Are there tests in the repo for
install-run.js
, so I could add a regression test for this scenario?Versions
The text was updated successfully, but these errors were encountered: