Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rush] Getting error when running command "rush update" #2151

Open
1 of 2 tasks
gauravgoyal5 opened this issue Sep 1, 2020 · 11 comments
Open
1 of 2 tasks

[Rush] Getting error when running command "rush update" #2151

gauravgoyal5 opened this issue Sep 1, 2020 · 11 comments

Comments

@gauravgoyal5
Copy link

gauravgoyal5 commented Sep 1, 2020

Please prefix the issue title with the project name i.e. [rush], [api-extractor] etc.

Is this a feature or a bug?

  • Feature
  • Bug

Actual behavior.

When I am running rush update, it is showing error : The system cannot find the path specified.
`The command failed:
D:\SPFx\Code\Production\MyTestProject\common\temp\npm-local\node_modules.bin\npm install --cache D:\SPFx\Code\Production\MyTestProject\common\temp\npm-cache --tmp D:\SPFx\Code\Production\MyTestProject\common\temp\npm-tmp
ERROR: Error: The command failed with exit code 1

Trying again (attempt #2)...

The system cannot find the path specified.

The command failed:
D:\SPFx\Code\Production\MyTestProject\common\temp\npm-local\node_modules.bin\npm install --cache D:\SPFx\Code\Production\MyTestProject\common\temp\npm-cache --tmp D:\SPFx\Code\Production\MyTestProject\common\temp\npm-tmp
ERROR: Error: The command failed with exit code 1

Trying again (attempt #3)...

The system cannot find the path specified.

The command failed:
D:\SPFx\Code\Production\MyTestProject\common\temp\npm-local\node_modules.bin\npm install --cache D:\SPFx\Code\Production\MyTestProject\common\temp\npm-cache --tmp D:\SPFx\Code\Production\MyTestProject\common\temp\npm-tmp
ERROR: Error: The command failed with exit code 1

Giving up after 3 attempts

ERROR: The command failed with exit code 1`

What is the expected behavior?
It should run rush update command & then after rush build

If this is a bug, please provide the tool version, Node.js version, and OS.

  • Tool: NPM, Windows 10, @microsoft/generator-sharepoint, VS Code, rush
  • Tool Version: NPM : 6.13.4, @microsoft/generator-sharepoint:1.11.0, rush : 5.23.4
  • Node Version: 10.18.1
    • Is this a LTS version?Yes
    • Have you tested on a LTS version?Yes
  • OS:Windows 10
@GiriB
Copy link

GiriB commented Sep 1, 2020

@gauravgoyal5 Can you create a repro and share the code? Also, is this something that suddenly started to fail for you (Was it working before)?

@gauravgoyal5
Copy link
Author

Correct. It started suddenly. It was working before.
I am trying to create new project in SPFx & got the same issues. I tried so many times with different locations as well but getting same issue.

@gauravgoyal5
Copy link
Author

gauravgoyal5 commented Sep 1, 2020

Hi,

I tried to run the Powershell ISE & got detailed error :

PS SPFx\Code\Production\MyTestProject> rush update

�[1mRush Multi-Project Build Tool 5.33.2�[22m�[36m - https://rushjs.io�[39m
Node.js version is 10.18.1 (LTS)

Starting "rush update"

�[36mIgnoring Git validation because this is not a Git working folder.�[39m
�[36m�[39m
Validating package manager shrinkwrap file.

Shrinkwrap file could not be found, skipping validation.

Trying to acquire lock for npm-6.13.4
Acquired lock for npm-6.13.4
Found npm version 6.13.4 in C:\Users\gaura.rush\node-v10.18.1\npm-6.13.4

Symlinking "SPFx\Code\Production\MyTestProject\common\temp\npm-local"
--> "C:\Users\gaura.rush\node-v10.18.1\npm-6.13.4"
Copying SPFx\Code\Production\MyTestProject\common\config\rush.npmrc --> SPFx\Code\Production\MyTestProject\common\temp.npmrc

�[1mUpdating temp projects in SPFx\Code\Production\MyTestProject\common\temp\projects�[22m
Finished creating temporary modules (0.06 seconds)
Deleting the "npm-cache" folder
Deleting the "npm-tmp" folder

�[1mRunning "npm install" in SPFx\Code\Production\MyTestProject\common\temp�[22m

node.exe : The system cannot find the path specified.
At C:\Users\gaura\AppData\Roaming\npm\rush.ps1:15 char:3

  • & "node$exe" "$basedir/node_modules/@microsoft/rush/bin/rush" $arg ...
  • + CategoryInfo          : NotSpecified: (The system cann...path specified.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
    
    
    

The command failed:
SPFx\Code\Production\MyTestProject\common\temp\npm-local\node_modules.bin\npm install --cache SPFx\Code\Production\MyTestProject\common\temp\npm-cache --tmp SPFx\Code\Production\MyTestProject\common\temp\npm-tmp
ERROR: Error: The command failed with exit code 1

Trying again (attempt #2)...

The system cannot find the path specified.

The command failed:
SPFx\Code\Production\MyTestProject\common\temp\npm-local\node_modules.bin\npm install --cache SPFx\Code\Production\MyTestProject\common\temp\npm-cache --tmp SPFx\Code\Production\MyTestProject\common\temp\npm-tmp
ERROR: Error: The command failed with exit code 1

Trying again (attempt #3)...

The system cannot find the path specified.

The command failed:
SPFx\Code\Production\MyTestProject\common\temp\npm-local\node_modules.bin\npm install --cache SPFx\Code\Production\MyTestProject\common\temp\npm-cache --tmp SPFx\Code\Production\MyTestProject\common\temp\npm-tmp
ERROR: Error: The command failed with exit code 1

Giving up after 3 attempts
�[31mERROR: The command failed with exit code 1�[39m
�[31m�[39m

PS SPFx\Code\Production\MyTestProject>

@iclanton
Copy link
Member

iclanton commented Sep 2, 2020

D:\SPFx\Code\Production\MyTestProject\common\temp\npm-local is a symlink to a folder under your HOME directory. Can you take a look at that folder and make sure it points to something valid?

Did you recently move your HOME directory?

@iclanton iclanton changed the title Getting error when running command "rush update" [Rush] Getting error when running command "rush update" Sep 2, 2020
@gauravgoyal5
Copy link
Author

npm-local folder is present as symlink under D:\SPFx\Code\Production\MyTestProject\common\temp.
No I have not moved. I am getting same issue when creating new structure in new place as well.

@dmichon-msft
Copy link
Contributor

I notice the listed paths seem to be missing a \ between node_modules and .bin; this suggest that there is a missing trailing slash in a configured path for npm-local

@gauravgoyal5
Copy link
Author

gauravgoyal5 commented Sep 16, 2020

Thanks for the reply. Can you please let me know in which file and path, I should add ""?

@gauravgoyal5
Copy link
Author

I tried to search for path which shown in log :
The command failed:
D:\SPFx\Code\Production\MyTestProject\common\temp\npm-local**node_modules.bin**npm install --cache D:\SPFx\Code\Production\MyTestProject\common\temp\npm-cache --tmp D:\SPFx\Code\Production\MyTestProject\common\temp\npm-tmp
ERROR: Error: The command failed with exit code 1

I found that, in npm-local folder there is no node_module folder present.
image

@tkvw
Copy link

tkvw commented Dec 3, 2021

I has a similar issue, for me it was an invalid package.json file.

  "devDependencies": {
    "tslib": "^2.3.1"
  },

vs

  "devDependencies": {
    "tslib": "^2.3.1", 
  },

@jeanmaried
Copy link

What resolved it for me was to delete the .rush folder in C:\Users\MyUser and reinstall rush. Not sure I even needed to reinstall rush to be honest. I noticed the .rush folder popped back up after running rush update.

@gomain
Copy link

gomain commented May 16, 2022

This also happened to me and indeed it was a trailing comma in one of a package.json file in the "keywords" section.

The error message in very misleading though. I was getting

The command failed:             
 /path/to/pnpm install --store /path/to/repo/common/temp/pnpm-store --no-prefer-frozen-lockfile --recursive --link-workspace-packages false                                                                           
ERROR: Error: The command failed with exit code 1                                                                      
                                                                                                                       
Trying again (attempt #2)...                                                                                           
                                                                                                                       
Deleting the "node_modules" folder                                                                                     
                                                                                                                                                                                                                                               
The command failed:                                                                                                                                                                                                                            
 /path/to/pnpm install --store /path/to/repo/common/temp/pnpm-store --no-prefer-frozen-lockfile --recursive --link-workspace-packages false                                                                                                                                                                                                   
ERROR: Error: The command failed with exit code 1    
                                                                                                                       
Trying again (attempt #3)...                                                                                           
                                                                                                                       
Deleting the "node_modules" folder                                                                                     
                                                                                                                       
The command failed:
 /path/to/pnpm install --store /path/to/repo/common/temp/pnpm-store --no-prefer-frozen-lockfile --recursive --link-workspace-packages false                                                                           
ERROR: Error: The command failed with exit code 1

Giving up after 3 attempts

Rush does complain about syntax error in rush.json so would have expected the same for other json files. Well this is pnpm failing without complaining about malformed json.

@iclanton iclanton moved this to Waiting for Author in Bug Triage Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting for Author
Development

No branches or pull requests

7 participants