Anyone know how to update to the most recent version of Amplify?
When I run amplify -v in my terminal I get 0.1.34
(my npm is version 6.5.0 and node is v11.6.0)
From what I can tell, Amplify is currently at version 0.1.42. I'm having some issues that I'm hoping can be resolved by updating to the most recent version of Amplify.
I've tried:
npm install -g @aws-amplify/cli
sudo npm install npm@latest -g
amplify update
amplify upgrade
No dice! Surely I'm missing something. Any ideas?
Can you provide any of the output from when you run npm install -g @aws-amplify/cli?
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated [email protected]: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit https://github.com/lukeed/kleur/releases/tag/v3.0.0\ for migration path(s).
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@types/node
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/data-uri-to-buffer
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/get-uri/node_modules/debug
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/get-uri
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/graphql
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/nopt
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-analytics
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-api
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-hosting
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-interactions
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-notifications
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@types
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/get-uri/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/grunt/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/npm/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/@aws-amplify
npm WARN [email protected] requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm ERR! path /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@types/node
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@types/node'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@types/node']
npm ERR! stack:
npm ERR! "Error: EACCES: permission denied, access '/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@types/node'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path:
npm ERR! '/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@types/node' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
Try it with sudo.
sudo npm i -g @aws-amplify/cli@latest
Also in project-config.json, does the projectPath property match the absolute path of your project's directory?
Ok I ran sudo npm i -g @aws-amplify/cli@latest and it worked! I'm now up to date. As for the other question,
Also in project-config.json, does the projectPath property match the absolute path of your project's directory?
sorry, how do I determine this? I'm assuming that's what's throwing so many errors for me? I'm new to this lol
Oh sorry, it should be in /proj_directory/amplify/backend/ (IIRC).
Also, could you please post your platform? I suspect you are developing on a Windows machine but using one of the Linux for Windows distros to interact with Amplify CLI -- is this correct? (Also you should close this issue, the Amplify community is leaving way too many resolves issues open :P)
No I'm on a Mac Mini (2012).
In my project folder/amplify/backend/
there's a amplify-meta.json file and an "auth" folder containing a yml and json file for cognito.
@claytonbwell Sorry, it's actually /project_dir/amplify/.config/.
Most helpful comment
sudo npm i -g @aws-amplify/cli@latest