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:
sudo npm i -g @aws-amplify/cli
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):
Smartphone (please complete the following information):
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.
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
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.