Amplify-cli: Error Installing

Created on 21 Sep 2018  路  3Comments  路  Source: aws-amplify/amplify-cli

Describe the bug
A clear and concise description of what the bug is.

Tried installing aws-cli from terminal, ran into node-modules issue.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
    Terminal
  2. Click on '....'
    Run sudo npm i -g @aws-amplify/cli
  3. Scroll down to '....'
    Output
  4. See error
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! path /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/npm/node_modules/ansistyles' -> '/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/npm/node_modules/.ansistyles.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nick/.npm/_logs/2018-09-21T19_07_38_332Z-debug.log

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
    MacOS | 10.13.6
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.
Nicks-MacBook-Pro:backend_api nick$ node -v v8.11.3 Nicks-MacBook-Pro:backend_api nick$ npm -v 5.6.0

You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.

Most helpful comment

I鈥檝e seen this happen sometimes due to a previous version of the CLI installed. You either might want to first npm uninstall the CLI and then install it again. Or you might want to delete this folder -> '/usr/local/lib/node_modules/@aws-amplify/ and then install the CLI.

All 3 comments

I鈥檝e seen this happen sometimes due to a previous version of the CLI installed. You either might want to first npm uninstall the CLI and then install it again. Or you might want to delete this folder -> '/usr/local/lib/node_modules/@aws-amplify/ and then install the CLI.

remove the older version from your system should resolve the problem.

Fixed using npm uninstall, thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amlcodes picture amlcodes  路  3Comments

jeanpaulcozzatti picture jeanpaulcozzatti  路  3Comments

ReidWeb picture ReidWeb  路  3Comments

kstro21 picture kstro21  路  3Comments

davo301 picture davo301  路  3Comments