[rush] error when using npm with rush: npm ERR! enoent ENOENT: no such file or directory, open ...\common\temp\npm-tmp\package.json'
UROjQ6r80p opened this issue · 2 comments
I want to create rush monorepo with npm.
First thing I do:
rush init
then I edit rush.json
to use "npmVersion": "10.2.3"
then I'm deleting entire common
folder and I write rush update --full --purge
Here is the full error:
Rush Multi-Project Build Tool 5.112.1 - https://rushjs.io
Node.js version is 20.10.0 (LTS)
Starting "rush update"
The --purge flag was specified, so performing "rush purge"
Purging C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp
Ignoring Git validation because this is not a Git working folder.
Trying to acquire lock for npm-10.2.3
Acquired lock for npm-10.2.3
Found npm version 10.2.3 in C:\Users\Maciej\.rush\node-v20.10.0\npm-10.2.3
Symlinking "C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp\npm-local"
--> "C:\Users\Maciej\.rush\node-v20.10.0\npm-10.2.3"
Using the default variant for installation.
Updating temp projects in C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp\projects
Finished creating temporary modules (0.00 seconds)
Checking installation in "C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp"
Deleting the "npm-cache" folder
Deleting the "npm-tmp" folder
Running "npm install" in C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp\npm-tmp/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp\npm-tmp\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp\npm-cache\_logs\2023-11-30T12_11_20_352Z-debug-0.log
The command failed:
C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp\npm-local\node_modules\.bin\npm install --cache C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp\npm-cache --tmp C:\Users\Maciej\Desktop\___LAB___\rushjs\common\temp\npm-tmp
ERROR: Error: The command failed with exit code 4294963238
Question | Answer |
---|---|
@microsoft/rush globally installed version? |
5.112.1 |
rushVersion from rush.json? |
5.112.1 |
useWorkspaces from rush.json? |
no |
Operating system? | Windows 10 |
Would you consider contributing a PR? | No |
Node.js version (node -v )? |
v20.10.0 |
Same on MacOS
The latest version of NPM that Rush officially supports is 4.5.0. In the past, NPM has been pretty unreliable and there were some insurmountable issues with it, so we didn't continue pursuing support for it. The best supported package manager is PNPM.
See notes here: https://rushjs.io/pages/maintainer/package_managers/, and the section specifically about NPM: https://rushjs.io/pages/maintainer/package_managers/#considerations-for-npm
We should probably have a warning about selecting a version newer than what we support.