Amplify-cli: Cant install aws-amplify/cli

Created on 24 Feb 2019  路  6Comments  路  Source: aws-amplify/amplify-cli

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:

  • OS: Manjaro Linux
    ]$ node -v
    v11.10.0
    ]$ npm -v
    6.8.0
bug installation pending-close-response-required

Most helpful comment

I fixed this problem by running

sudo npm cache clean --force

All 6 comments

@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

Was this page helpful?
0 / 5 - 0 ratings