aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.81k stars 819 forks source link

CLI not working after upgrading (Windows 10 Enterprise) #11236

Open mehdi-blanchard opened 1 year ago

mehdi-blanchard commented 1 year ago

Before opening, please confirm:

How did you install the Amplify CLI?

npm install -g @aws-amplify/cli

If applicable, what version of Node.js are you using?

v16.14.2

Amplify CLI Version

@newest

What operating system are you using?

Windows 10 Enterprise

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Amplify Categories

auth, function, api, hosting

Amplify Commands

Not applicable

Describe the bug

Everything was working fine prior to the update. Can't remember exactly which version it was but I think it was 2 versions below current. After upgrading, running any amplify command returns nothing (Ex: amplify version, amplify status). This is similar to this issue but on Windows: https://github.com/aws-amplify/amplify-cli/issues/10193

amplify

I am not an administrator on my machine. I tried to run the following

I got IT to open a CMD as administrator. I ran the same commands with no luck. I was copying the relevant files and folders from %appdata%\npm

Expected behavior

If I type 'amplify version' or 'amplify status', I expect the command to run normally.

After 'upgrade' it returns nothing at all

Reproduction steps

npm install -g @aws-amplify/cli

GraphQL schema(s)

```graphql # Put schemas below this line ```

Project Identifier

'amplify diagnose' does not return anything like the other commands

Log output

``` 0 verbose cli [ 0 verbose cli 'C:\\Program Files\\nodejs\\node.exe', 0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 0 verbose cli 'install', 0 verbose cli '-g', 0 verbose cli '@aws-amplify/cli' 0 verbose cli ] 1 info using npm@8.5.0 2 info using node@v16.14.2 3 timing npm:load:whichnode Completed in 0ms 4 timing config:load:defaults Completed in 1ms 5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms 6 timing config:load:builtin Completed in 3ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 0ms 9 timing config:load:project Completed in 3ms 10 timing config:load:file:C:\Users\mblancha\.npmrc Completed in 0ms 11 timing config:load:user Completed in 0ms 12 timing config:load:file:C:\Users\mblancha\AppData\Roaming\npm\etc\npmrc Completed in 0ms 13 timing config:load:global Completed in 0ms 14 timing config:load:validate Completed in 0ms 15 timing config:load:credentials Completed in 1ms 16 timing config:load:setEnvs Completed in 0ms 17 timing config:load Completed in 11ms 18 timing npm:load:configload Completed in 11ms 19 timing npm:load:setTitle Completed in 1ms 20 timing config:load:flatten Completed in 2ms 21 timing npm:load:display Completed in 3ms 22 verbose logfile C:\Users\mblancha\AppData\Local\npm-cache\_logs\2022-10-21T05_06_49_299Z-debug-0.log 23 timing npm:load:logFile Completed in 7ms 24 timing npm:load:timers Completed in 0ms 25 timing npm:load:configScope Completed in 0ms 26 timing npm:load Completed in 23ms 27 timing arborist:ctor Completed in 0ms 28 silly logfile start cleaning logs, removing 2 files 29 timing idealTree:init Completed in 5ms 30 timing idealTree:userRequests Completed in 2ms 31 silly idealTree buildDeps 32 silly fetch manifest @aws-amplify/cli@* 33 http fetch GET 200 https://registry.npmjs.org/@aws-amplify%2fcli 390ms (cache revalidated) 34 silly placeDep ROOT @aws-amplify/cli@10.3.1 OK for: want: * 35 silly fetch manifest axios@^0.26.0 36 silly fetch manifest rimraf@^3.0.2 37 silly fetch manifest tar-stream@^2.2.0 38 http fetch GET 200 https://registry.npmjs.org/axios 49ms (cache revalidated) 39 http fetch GET 200 https://registry.npmjs.org/tar-stream 77ms (cache revalidated) 40 http fetch GET 200 https://registry.npmjs.org/rimraf 79ms (cache revalidated) 41 timing idealTree:#root Completed in 495ms 42 silly placeDep node_modules/@aws-amplify/cli axios@0.26.1 OK for: @aws-amplify/cli@10.3.1 want: ^0.26.0 43 silly placeDep node_modules/@aws-amplify/cli rimraf@3.0.2 OK for: @aws-amplify/cli@10.3.1 want: ^3.0.2 44 silly placeDep node_modules/@aws-amplify/cli tar-stream@2.2.0 OK for: @aws-amplify/cli@10.3.1 want: ^2.2.0 45 silly fetch manifest follow-redirects@^1.14.8 46 silly fetch manifest glob@^7.1.3 47 silly fetch manifest bl@^4.0.3 48 silly fetch manifest end-of-stream@^1.4.1 49 silly fetch manifest fs-constants@^1.0.0 50 silly fetch manifest inherits@^2.0.3 51 silly fetch manifest readable-stream@^3.1.1 52 http fetch GET 200 https://registry.npmjs.org/end-of-stream 45ms (cache revalidated) 53 http fetch GET 200 https://registry.npmjs.org/follow-redirects 47ms (cache revalidated) 54 http fetch GET 200 https://registry.npmjs.org/fs-constants 51ms (cache revalidated) 55 http fetch GET 200 https://registry.npmjs.org/bl 79ms (cache revalidated) 56 http fetch GET 200 https://registry.npmjs.org/glob 84ms (cache revalidated) 57 http fetch GET 200 https://registry.npmjs.org/inherits 85ms (cache revalidated) 58 http fetch GET 200 https://registry.npmjs.org/readable-stream 91ms (cache revalidated) 59 timing idealTree:node_modules/@aws-amplify/cli Completed in 101ms 60 silly placeDep node_modules/@aws-amplify/cli follow-redirects@1.15.2 OK for: axios@0.26.1 want: ^1.14.8 61 timing idealTree:node_modules/@aws-amplify/cli/node_modules/axios Completed in 2ms 62 timing idealTree:node_modules/@aws-amplify/cli/node_modules/follow-redirects Completed in 0ms 63 silly placeDep node_modules/@aws-amplify/cli glob@7.2.3 OK for: rimraf@3.0.2 want: ^7.1.3 64 silly fetch manifest fs.realpath@^1.0.0 65 silly fetch manifest inflight@^1.0.4 66 silly fetch manifest inherits@2 67 silly fetch manifest minimatch@^3.1.1 68 silly fetch manifest once@^1.3.0 69 silly fetch manifest path-is-absolute@^1.0.0 70 http fetch GET 200 https://registry.npmjs.org/minimatch 38ms (cache revalidated) 71 http fetch GET 200 https://registry.npmjs.org/once 39ms (cache revalidated) 72 http fetch GET 200 https://registry.npmjs.org/fs.realpath 46ms (cache revalidated) 73 http fetch GET 200 https://registry.npmjs.org/inflight 47ms (cache revalidated) 74 http fetch GET 200 https://registry.npmjs.org/path-is-absolute 264ms (cache revalidated) 75 timing idealTree:node_modules/@aws-amplify/cli/node_modules/rimraf Completed in 267ms 76 silly placeDep node_modules/@aws-amplify/cli fs.realpath@1.0.0 OK for: glob@7.2.3 want: ^1.0.0 77 silly placeDep node_modules/@aws-amplify/cli inflight@1.0.6 OK for: glob@7.2.3 want: ^1.0.4 78 silly placeDep node_modules/@aws-amplify/cli inherits@2.0.4 OK for: glob@7.2.3 want: 2 79 silly placeDep node_modules/@aws-amplify/cli minimatch@3.1.2 OK for: glob@7.2.3 want: ^3.1.1 80 silly placeDep node_modules/@aws-amplify/cli once@1.4.0 OK for: glob@7.2.3 want: ^1.3.0 81 silly placeDep node_modules/@aws-amplify/cli path-is-absolute@1.0.1 OK for: glob@7.2.3 want: ^1.0.0 82 silly fetch manifest wrappy@1 83 silly fetch manifest brace-expansion@^1.1.7 84 http fetch GET 200 https://registry.npmjs.org/wrappy 39ms (cache revalidated) 85 http fetch GET 200 https://registry.npmjs.org/brace-expansion 41ms (cache revalidated) 86 timing idealTree:node_modules/@aws-amplify/cli/node_modules/glob Completed in 47ms 87 timing idealTree:node_modules/@aws-amplify/cli/node_modules/fs.realpath Completed in 0ms 88 silly placeDep node_modules/@aws-amplify/cli wrappy@1.0.2 OK for: inflight@1.0.6 want: 1 89 timing idealTree:node_modules/@aws-amplify/cli/node_modules/inflight Completed in 1ms 90 timing idealTree:node_modules/@aws-amplify/cli/node_modules/inherits Completed in 0ms 91 silly placeDep node_modules/@aws-amplify/cli brace-expansion@1.1.11 OK for: minimatch@3.1.2 want: ^1.1.7 92 silly fetch manifest balanced-match@^1.0.0 93 silly fetch manifest concat-map@0.0.1 94 http fetch GET 200 https://registry.npmjs.org/balanced-match 33ms (cache revalidated) 95 http fetch GET 200 https://registry.npmjs.org/concat-map 36ms (cache revalidated) 96 timing idealTree:node_modules/@aws-amplify/cli/node_modules/minimatch Completed in 39ms 97 silly placeDep node_modules/@aws-amplify/cli balanced-match@1.0.2 OK for: brace-expansion@1.1.11 want: ^1.0.0 98 silly placeDep node_modules/@aws-amplify/cli concat-map@0.0.1 OK for: brace-expansion@1.1.11 want: 0.0.1 99 timing idealTree:node_modules/@aws-amplify/cli/node_modules/brace-expansion Completed in 1ms 100 timing idealTree:node_modules/@aws-amplify/cli/node_modules/balanced-match Completed in 0ms 101 timing idealTree:node_modules/@aws-amplify/cli/node_modules/concat-map Completed in 0ms 102 timing idealTree:node_modules/@aws-amplify/cli/node_modules/once Completed in 0ms 103 timing idealTree:node_modules/@aws-amplify/cli/node_modules/path-is-absolute Completed in 0ms 104 silly placeDep node_modules/@aws-amplify/cli bl@4.1.0 OK for: tar-stream@2.2.0 want: ^4.0.3 105 silly placeDep node_modules/@aws-amplify/cli end-of-stream@1.4.4 OK for: tar-stream@2.2.0 want: ^1.4.1 106 silly placeDep node_modules/@aws-amplify/cli fs-constants@1.0.0 OK for: tar-stream@2.2.0 want: ^1.0.0 107 silly placeDep node_modules/@aws-amplify/cli readable-stream@3.6.0 OK for: tar-stream@2.2.0 want: ^3.1.1 108 silly fetch manifest buffer@^5.5.0 109 silly fetch manifest string_decoder@^1.1.1 110 silly fetch manifest util-deprecate@^1.0.1 111 http fetch GET 200 https://registry.npmjs.org/util-deprecate 40ms (cache revalidated) 112 http fetch GET 200 https://registry.npmjs.org/buffer 41ms (cache revalidated) 113 http fetch GET 200 https://registry.npmjs.org/string_decoder 43ms (cache revalidated) 114 timing idealTree:node_modules/@aws-amplify/cli/node_modules/tar-stream Completed in 47ms 115 silly placeDep node_modules/@aws-amplify/cli buffer@5.7.1 OK for: bl@4.1.0 want: ^5.5.0 116 silly fetch manifest base64-js@^1.3.1 117 silly fetch manifest ieee754@^1.1.13 118 http fetch GET 200 https://registry.npmjs.org/base64-js 41ms (cache revalidated) 119 http fetch GET 200 https://registry.npmjs.org/ieee754 282ms (cache revalidated) 120 timing idealTree:node_modules/@aws-amplify/cli/node_modules/bl Completed in 284ms 121 silly placeDep node_modules/@aws-amplify/cli base64-js@1.5.1 OK for: buffer@5.7.1 want: ^1.3.1 122 silly placeDep node_modules/@aws-amplify/cli ieee754@1.2.1 OK for: buffer@5.7.1 want: ^1.1.13 123 timing idealTree:node_modules/@aws-amplify/cli/node_modules/buffer Completed in 1ms 124 timing idealTree:node_modules/@aws-amplify/cli/node_modules/base64-js Completed in 0ms 125 timing idealTree:node_modules/@aws-amplify/cli/node_modules/end-of-stream Completed in 0ms 126 timing idealTree:node_modules/@aws-amplify/cli/node_modules/fs-constants Completed in 0ms 127 timing idealTree:node_modules/@aws-amplify/cli/node_modules/ieee754 Completed in 0ms 128 silly placeDep node_modules/@aws-amplify/cli string_decoder@1.3.0 OK for: readable-stream@3.6.0 want: ^1.1.1 129 silly placeDep node_modules/@aws-amplify/cli util-deprecate@1.0.2 OK for: readable-stream@3.6.0 want: ^1.0.1 130 silly fetch manifest safe-buffer@~5.2.0 131 http fetch GET 200 https://registry.npmjs.org/safe-buffer 31ms (cache revalidated) 132 timing idealTree:node_modules/@aws-amplify/cli/node_modules/readable-stream Completed in 33ms 133 silly placeDep node_modules/@aws-amplify/cli safe-buffer@5.2.1 OK for: string_decoder@1.3.0 want: ~5.2.0 134 timing idealTree:node_modules/@aws-amplify/cli/node_modules/string_decoder Completed in 1ms 135 timing idealTree:node_modules/@aws-amplify/cli/node_modules/safe-buffer Completed in 0ms 136 timing idealTree:node_modules/@aws-amplify/cli/node_modules/util-deprecate Completed in 0ms 137 timing idealTree:node_modules/@aws-amplify/cli/node_modules/wrappy Completed in 0ms 138 timing idealTree:buildDeps Completed in 1323ms 139 timing idealTree:fixDepFlags Completed in 1ms 140 timing idealTree Completed in 1331ms 141 timing reify:loadTrees Completed in 1332ms 142 timing reify:diffTrees Completed in 1ms 143 silly reify moves {} 144 timing reify:retireShallow Completed in 1ms 145 timing reify:createSparse Completed in 11ms 146 timing reify:loadBundles Completed in 0ms 147 silly audit bulk request { 147 silly audit '@aws-amplify/cli': [ '10.3.1' ], 147 silly audit axios: [ '0.26.1' ], 147 silly audit rimraf: [ '3.0.2' ], 147 silly audit 'tar-stream': [ '2.2.0' ], 147 silly audit 'follow-redirects': [ '1.15.2' ], 147 silly audit glob: [ '7.2.3' ], 147 silly audit 'fs.realpath': [ '1.0.0' ], 147 silly audit inflight: [ '1.0.6' ], 147 silly audit inherits: [ '2.0.4' ], 147 silly audit minimatch: [ '3.1.2' ], 147 silly audit once: [ '1.4.0' ], 147 silly audit 'path-is-absolute': [ '1.0.1' ], 147 silly audit wrappy: [ '1.0.2' ], 147 silly audit 'brace-expansion': [ '1.1.11' ], 147 silly audit 'balanced-match': [ '1.0.2' ], 147 silly audit 'concat-map': [ '0.0.1' ], 147 silly audit bl: [ '4.1.0' ], 147 silly audit 'end-of-stream': [ '1.4.4' ], 147 silly audit 'fs-constants': [ '1.0.0' ], 147 silly audit 'readable-stream': [ '3.6.0' ], 147 silly audit buffer: [ '5.7.1' ], 147 silly audit 'base64-js': [ '1.5.1' ], 147 silly audit ieee754: [ '1.2.1' ], 147 silly audit string_decoder: [ '1.3.0' ], 147 silly audit 'util-deprecate': [ '1.0.2' ], 147 silly audit 'safe-buffer': [ '5.2.1' ] 147 silly audit } 148 silly tarball no local data for @aws-amplify/cli@https://registry.npmjs.org/@aws-amplify/cli/-/cli-10.3.1.tgz. Extracting by manifest. 149 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/end-of-stream Completed in 71ms 150 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/path-is-absolute Completed in 70ms 151 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/brace-expansion Completed in 71ms 152 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/once Completed in 70ms 153 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/wrappy Completed in 72ms 154 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/inflight Completed in 71ms 155 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/string_decoder Completed in 74ms 156 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/minimatch Completed in 74ms 157 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/fs-constants Completed in 75ms 158 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/ieee754 Completed in 75ms 159 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/inherits Completed in 75ms 160 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/balanced-match Completed in 76ms 161 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/safe-buffer Completed in 77ms 162 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/fs.realpath Completed in 76ms 163 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/util-deprecate Completed in 78ms 164 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/base64-js Completed in 78ms 165 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/rimraf Completed in 78ms 166 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/glob Completed in 79ms 167 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/concat-map Completed in 80ms 168 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/buffer Completed in 81ms 169 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/follow-redirects Completed in 80ms 170 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/tar-stream Completed in 81ms 171 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/bl Completed in 84ms 172 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/readable-stream Completed in 104ms 173 http fetch GET 200 https://registry.npmjs.org/@aws-amplify/cli/-/cli-10.3.1.tgz 102ms (cache miss) 174 timing reifyNode:node_modules/@aws-amplify/cli Completed in 122ms 175 timing reifyNode:node_modules/@aws-amplify/cli/node_modules/axios Completed in 135ms 176 timing reify:unpack Completed in 137ms 177 timing reify:unretire Completed in 0ms 178 timing build:queue Completed in 2ms 179 timing build:link:node_modules/@aws-amplify/cli Completed in 5ms 180 timing build:link:node_modules/@aws-amplify/cli/node_modules/rimraf Completed in 4ms 181 timing build:link Completed in 5ms 182 info run @aws-amplify/cli@10.3.1 postinstall node_modules/@aws-amplify/cli node ./lib/install.js || echo "failed to install amplify binary" 183 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 241ms 184 timing auditReport:getReport Completed in 244ms 185 silly audit report {} 186 timing auditReport:init Completed in 0ms 187 timing reify:audit Completed in 244ms 188 info run @aws-amplify/cli@10.3.1 postinstall { code: 0, signal: null } 189 timing build:run:postinstall:node_modules/@aws-amplify/cli Completed in 85548ms 190 timing build:run:postinstall Completed in 85548ms 191 timing build:deps Completed in 85555ms 192 timing build Completed in 85555ms 193 timing reify:build Completed in 85556ms 194 timing reify:trash Completed in 0ms 195 timing reify Completed in 87051ms 196 silly ADD node_modules/@aws-amplify/cli 197 silly ADD node_modules/@aws-amplify/cli/node_modules/safe-buffer 198 silly ADD node_modules/@aws-amplify/cli/node_modules/util-deprecate 199 silly ADD node_modules/@aws-amplify/cli/node_modules/string_decoder 200 silly ADD node_modules/@aws-amplify/cli/node_modules/ieee754 201 silly ADD node_modules/@aws-amplify/cli/node_modules/base64-js 202 silly ADD node_modules/@aws-amplify/cli/node_modules/buffer 203 silly ADD node_modules/@aws-amplify/cli/node_modules/readable-stream 204 silly ADD node_modules/@aws-amplify/cli/node_modules/fs-constants 205 silly ADD node_modules/@aws-amplify/cli/node_modules/end-of-stream 206 silly ADD node_modules/@aws-amplify/cli/node_modules/bl 207 silly ADD node_modules/@aws-amplify/cli/node_modules/concat-map 208 silly ADD node_modules/@aws-amplify/cli/node_modules/balanced-match 209 silly ADD node_modules/@aws-amplify/cli/node_modules/brace-expansion 210 silly ADD node_modules/@aws-amplify/cli/node_modules/wrappy 211 silly ADD node_modules/@aws-amplify/cli/node_modules/path-is-absolute 212 silly ADD node_modules/@aws-amplify/cli/node_modules/once 213 silly ADD node_modules/@aws-amplify/cli/node_modules/minimatch 214 silly ADD node_modules/@aws-amplify/cli/node_modules/inherits 215 silly ADD node_modules/@aws-amplify/cli/node_modules/inflight 216 silly ADD node_modules/@aws-amplify/cli/node_modules/fs.realpath 217 silly ADD node_modules/@aws-amplify/cli/node_modules/glob 218 silly ADD node_modules/@aws-amplify/cli/node_modules/follow-redirects 219 silly ADD node_modules/@aws-amplify/cli/node_modules/tar-stream 220 silly ADD node_modules/@aws-amplify/cli/node_modules/rimraf 221 silly ADD node_modules/@aws-amplify/cli/node_modules/axios 222 timing command:install Completed in 87058ms 223 verbose exit 0 224 timing npm Completed in 87388ms 225 info ok ```

Additional information

No response

ykethan commented 1 year ago

Hey @mehdi-blanchard, thank you for reaching out. I was hoping to get some additional information on this behaviour. Does installing a older version of the amplify CLI works as expected? could you run the following commands.

  1. uninstall amplify cli first by using: npm uninstall -g @aws-amplify/cli or amplify uninstall
  2. install an older version of the amplify CLI for example: npm i @aws-amplify/cli@10.0.0
  3. restart the terminal
  4. test the command amplify status or amplify -v

if the commands work, could you then run amplify upgrade and test the commands. Do let us know if the older CLI works as expected and if doing an upgrade experiences similar behaviour.

mehdi-blanchard commented 1 year ago

Hey @ykethan,

I have uninstalled it and re-installed it using: npm i -g @aws-amplify/cli@10.0.0, then restarted the terminal and still nothing happens when I run the commands 'amplify version', 'amplify status' or 'amplify upgrade':

amplify2

amplify4

Do you know if the "install -g" should be run as Administrator, or does everything goes only in the user's %appdata% folder?

As I am not an Admin on my machine if something is supposed to be written in the Program Files folder it will not work.

However if I ran the install as an Admin, then whatever is supposed to go on the %appdata% folder goes into the admin user %appdata%, and not my %appdata% folder, so I need to copy the amplify stuff from Admin to my folder. However I could be missing things in the process, as I don't know the full extent of what I need to copy.

mehdi-blanchard commented 1 year ago

Hey @ykethan

The issue seems to be related to being a non-admin user.

If I run CMD as Administrator, I can install the CLI and I can run "amplify version"

amplify5

However it doesn't work when I switch back to my non-admin CMD.

I tried copying the Amplify content from the admin user AppData/Roaming into my AppData/Roaming (I am pretty sure that's how I got it to work the first time), I also tried re-installing on top as well in my non admin CMD, but it still doesn't work.

Not sure what else I could try...

ykethan commented 1 year ago

Hey @mehdi-blanchard , thank you for the information. could you let us know if NPM was installed as Administrator? If NPM was installed as Administrator and Amplify CLI was installed as non Administrator the Amplify CLI may run into the unexpected behaviour. Could you try reinstalling NPM and Amplify CLI without Administrator privileges and test the Amplify commands?

mehdi-blanchard commented 1 year ago

Hi @ykethan Still not working unfortunately. I have uninstalled Node.js, then downloaded the Node.js binary, copied it in my C:\ProgramData and updated the %PATH%. So no install with admin rights for Node.js now and the latest npm came with it. Reinstalled amplify with: npm i -g @aws-amplify/cli@10.0.0 (also tried latest)

amplify6

Same result as before. Unless there is something else I could try, is there any ways to get logs or debug this to see where it's failing?

mehdi-blanchard commented 1 year ago

Hey @ykethan,

I navigated to my user folder and found a '.amplify' folder. In this folder there is a 'bin' folder with 'amplify.exe'. I clicked it on it and got a message that this app was blocked (our network uses AppLocker)! So for some reason something in this app triggers AppLocker. When it runs through the amplify scripts the alert message does not show up, so I couldn't know it was blocked. I now have to wait for IT to unlock it, and when it's done I'll post the result.

amplify7

ykethan commented 1 year ago

Hey @mehdi-blanchard, interesting and great callout. I tested this in my windows PC and was able to run amplify.exe. Please do let us know if this mitigates the issue.

mehdi-blanchard commented 1 year ago

Hey @ykethan Thanks for the support. Everything is working as expected now that the AppLocker authorization has been accepted. Next time I update Amplify I might have the same issue as I am not sure if AppLocker uses the Program Hash or the file location. At least I'll know how to fix it.

mehdi-blanchard commented 1 year ago

Hi @ykethan I just had some feedback from the IT team: "Currently if an application is not signed, we only use the file hash for allowing apps to run. We can take their signature and that one rule will allow anything signed to run. It attaches their cert to the app so it can be verified as legit. We have had quite a few successes with reaching out to the software vendor and requesting them to sign their apps"

This means that as long as the App is not signed, then I can't update unless I don't need to use it for a few days to allow for the re-approval process.

Not sure if other users are having the same issues or if signing the App is an option but I just wanted you to know. You can close this issue as I had to Reopen it to leave the comment.