Describe the bug
I try to install the aws-amplify/cli as this says https://aws-amplify.github.io/docs/
but it fails.
After I try to run
sudo npm install -g @aws-amplify/cli
to install the package, it says this:
`]$ sudo npm install -g @aws-amplify/cli
npm ERR! Unexpected end of JSON input while parsing near '...iZIKsukug/o5wXMT5ocmX'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-02-24T19_03_27_359Z-debug.log
`
Here is the debug log:
https://pastebin.com/q9fVJ92f
Information of the environment:
@edoantonioco Can try running amplify -v and see if it returns anything?
it says:
bash: amplify: order not found
I fixed this problem by running
sudo npm cache clean --force
Unexpected end of JSON input while parsing near '...rectories":{},"dist":' while npm i @aws-amplify/cli
[x] cache clean
[x] node -v => 10
[x] npm -v => 6
I have the same issue. I have:
node v12.17.0
npm 6.14.4
Windows 10
I tried cache clean, I even deleted whatever in npm and npm-cache folder and I still get the same type of errors.
I also tried to install older version of Amplify cli and I got the same errors.
I appreciate if anyone has other suggestions.
I successfully installed Amplify 4.21.0 only after deleting the package.lock.json file in C:\Users\username
Most helpful comment
I fixed this problem by running