apache / cordova-plugman

Apache Cordova Plugman
https://cordova.apache.org/
Apache License 2.0
400 stars 151 forks source link

Unable to install plugman #97

Closed SnehalJ1509 closed 5 years ago

SnehalJ1509 commented 5 years ago

When I try to install plugman with command npm install -g plugman in macOS, it gives error - Unexpected end of JSON input while parsing near '..."3.4.1":{"name":"modu'

Kindly find the entire stacktrace in attached file.

Node: v8.0.0 npm: 5.4.1 cordova: 6.5.0 OS: macOS Sierra

2018-11-22T07_18_01_475Z-debug.log

janpio commented 5 years ago

That looks pretty much like a random corrupted file while downloading the npm dependencies. Can you reproduce the error multiple times?

SnehalJ1509 commented 5 years ago

That looks pretty much like a random corrupted file while downloading the npm dependencies. Can you reproduce the error multiple times?

Yes, its continuously giving this error.

janpio commented 5 years ago

My normal advice in cases of npm giving problem is to install nvm, or any node version manager, and install a new node/npm and try with that one. 99.9% this solved the problem.

erisu commented 5 years ago

@SnehalJ1509 Is this still an issue?

I would also recommend what @janpio mentioned above. Try updating and using a newer version of Node.js and NPM.

I would also like to point out that, plugman@3.0.0 has been released since.

SnehalJ1509 commented 5 years ago

@erisu No, this is not an issue anymore. I was occupied with other thing so was not able to test later whether it started working or not. I just tried the solution given by @janpio , I already had nvm installed on my machine with two node versions 8.0.0 and 10.15.1 and I was able to install plugman v3.0.0 on both without any errors. So its not an issue anymore and I'll close the issue.

Thank you everyone for your advice and time.