Skip to content

Could not update the project! Reason is: Command npm.cmd failed with exit code 1 #5440

New issue

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

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

Already on GitHub? # to your account

Closed
datnd35 opened this issue Nov 12, 2020 · 6 comments · Fixed by #5441
Closed

Could not update the project! Reason is: Command npm.cmd failed with exit code 1 #5440

datnd35 opened this issue Nov 12, 2020 · 6 comments · Fixed by #5441
Labels

Comments

@datnd35
Copy link

datnd35 commented Nov 12, 2020

I updating nativescript latest version handmade but when run command tns update have errors appears
Pls comment below if you have any solution

image
Thanks !

@lukesUbuntu
Copy link

you should post your package.json

@sr3dna
Copy link

sr3dna commented Nov 17, 2020

I encountered the same issue. All I did was clone this sample: https://github.com/ProgressNS/nativescript-ui-samples-angular.git. Then run 'tns update'

Image

I got 'No issues were detected' when I run 'tns doctor'.

My environment:

nativescript: 7.0.11
npm: 6.14.8
@angular/cli: 10.1.2
javac: 1.8.0_191
node: 10.17.0

@rigor789
Copy link
Member

@devcodedao Please post the contents of the package.json

@sr3dna which folder did you ran into that? I tried in charts and it required a migration, and then I tried in listview which seems to have a similar issue. By using yarn, it printed a more helpful message:

Could not update the project! Reason is: No matching version found for tns-ios@null.

This is likely a bug in the CLI, just helpful if you can confirm you are seeing the same thing!

@rigor789 rigor789 transferred this issue from NativeScript/NativeScript Nov 17, 2020
@rigor789 rigor789 added the bug label Nov 17, 2020
@sr3dna
Copy link

sr3dna commented Nov 17, 2020

@rigor789 I was trying to update listview when I ran into that issue. Thanks to you mentioning 'ns migrate'. I was able to work around that 'command npm failed' issue by first migrating the listview project. Here is what I did:

git reset --hard (from root of nativescript-ui-samples-angular)
git clean -dfx
cd listview
ns migrate
npm install
ns update
(This time I don't get the 'Command npm failed with exit code 1' error.)

Hope this helps anyone troubleshooting. Thanks
sr3dna

janoshrubos added a commit to janoshrubos/nativescript-cli that referenced this issue Nov 21, 2020
rigor789 pushed a commit that referenced this issue Nov 21, 2020
@FZampetti
Copy link

Hi,
I still have this error could anyone help me?
I'm trying to migrate the project with nativescript 6.8.0 to 7, I have globally installed nativescrit 7.0.11.

@rigor789
Copy link
Member

rigor789 commented Dec 3, 2020

@FZampetti you can install nativescript@next to include this fix - have a few things lined up for the release, so it hasn't been published yet.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants