Unable to upgrade Node AND Amplify prior to amplifyPush in build in Amplify Console CI/CD

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?
npm & yarn
If applicable, what version of Node.js are you using?
node 16
Amplify CLI Version
7.3.3 - 7.3.5
What operating system are you using?
Amazon Linux
Amplify Categories
Not applicable
Amplify Commands
push, Not applicable
Describe the bug
In order to support typescript compilation in lambda functions (https://docs.amplify.aws/cli/function/build-options/) I need to upgrade node & npm prior to amplifyPush --simple (which has a dependency on @aws-amplify/cli).
Most folks seem to do node upgrades in the frontEnd-preBuild via nvm and while this destroys amplify cli, this goes unnoticed since the backEnd-build has already taken place.
I tried a few different methods to get this working (below) but the simplest repro steps below (nvm install 16, yarn global add @aws-amplify/cli create the following error:
2021-11-17T02:42:03.185Z [INFO]: success Installed "<EMAIL_ADDRESS>with binaries:
2021-11-17T02:42:03.186Z [INFO]: - amplify
2021-11-17T02:42:03.186Z [INFO]: Done in 50.80s.
2021-11-17T02:42:03.222Z [INFO]: # Executing command: amplify --version
2021-11-17T02:42:08.754Z [INFO]: The following official plugins are missing or inactive:
2021-11-17T02:42:08.756Z [INFO]: awscloudformation: provider |<EMAIL_ADDRESS>                                 analytics: category |<EMAIL_ADDRESS>                                 api: category |<EMAIL_ADDRESS>                                 function: category |<EMAIL_ADDRESS>                                 geo: category |<EMAIL_ADDRESS>                                 hosting: category |<EMAIL_ADDRESS>                                 hosting: category |<EMAIL_ADDRESS>                                 hosting: category |<EMAIL_ADDRESS>                                 interactions: category |<EMAIL_ADDRESS>                                 notifications: category |<EMAIL_ADDRESS>                                 predictions: category |<EMAIL_ADDRESS>                                 xr: category |<EMAIL_ADDRESS>                                 codegen: util |<EMAIL_ADDRESS>                                 flutter: frontend |<EMAIL_ADDRESS>                                 android: frontend |<EMAIL_ADDRESS>                                 ios: frontend |<EMAIL_ADDRESS>                                 javascript: frontend |<EMAIL_ADDRESS>                                 mock: util |<EMAIL_ADDRESS>2021-11-17T02:42:08.815Z [INFO]: 7.3.5
2021-11-17T02:42:09.170Z [INFO]: # Completed phase: preBuild

Other techniques attempted

nvm install 16
nvm install 16 --reinstall-packages-from=node
npm install -g @aws-amplify/cli@latest
yarn global add @aws-amplify/cli
with & without @aws-amplify/cli@latest in _LIVE_UPDATES
Attempted to trigger nvm install 16 via _LIVE_UPDATES

Side note. I had managed to workaround this issue previously by upgrading both npm and @aws-amplify/cli in _LIVE_UPDATES, which was just enough at the time, but that stopped working last week. I suspect the root cause of failure was a change (Tue 16th between 12:00 and 18:00 GMT) to run the npm live updates in parallel instead of in the supplied order. it's obviously not possible to upgrade npm while npm is installing something else so my hack failed. Regardless, the Cloning Repository step was marked as successful even though it failed with errors.
Expected behavior
It should be possible to upgrade node using nvm and install @aws-amplify/cli@latest prior to amplifyPush
Reproduction steps

version: 1
backend:
  phases:
    preBuild:
      commands:
        - "# Check Versions"
        - node --version
        - npm --version
        - yarn --version
        - which amplify
        - amplify --version
        - nvm install 16
        # - nvm install 16 --reinstall-packages-from=node
        # - nvm use 16
        # - npm install -g @aws-amplify/cli@latest
        - yarn global add @aws-amplify/cli
        - amplify --version
    build:
      commands:
        - "# Execute Amplify CLI with the helper script"
        - amplifyPush --simple
 ...

GraphQL schema(s)

# Put schemas below this line
n/a

Log output

# Put your logs below this line
                                 # Starting phase: preBuild
                                 # Executing command: node --version
2021-11-17T02:41:04.169Z [INFO]: v12.21.0
2021-11-17T02:41:04.170Z [INFO]: # Executing command: npm --version
2021-11-17T02:41:04.285Z [INFO]: 6.14.11
2021-11-17T02:41:04.288Z [INFO]: # Executing command: yarn --version
2021-11-17T02:41:04.938Z [INFO]: 1.22.0
2021-11-17T02:41:04.944Z [INFO]: # Executing command: which amplify
2021-11-17T02:41:04.945Z [INFO]: /root/.nvm/versions/node/v12.21.0/bin/amplify
2021-11-17T02:41:04.945Z [INFO]: # Executing command: amplify --version
2021-11-17T02:41:09.393Z [INFO]: 7.3.5
2021-11-17T02:41:09.734Z [INFO]: # Executing command: nvm install 16
2021-11-17T02:41:10.143Z [INFO]: Downloading and installing node v16.13.0...
2021-11-17T02:41:10.337Z [WARNING]: Downloading https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-x64.tar.gz...
2021-11-17T02:41:10.459Z [WARNING]:
2021-11-17T02:41:10.459Z [WARNING]: 0.5%
2021-11-17T02:41:10.561Z [WARNING]: ######
2021-11-17T02:41:10.562Z [WARNING]: 8.8%
2021-11-17T02:41:10.662Z [WARNING]: ##############################
2021-11-17T02:41:10.663Z [WARNING]: #####                                       48.9%
2021-11-17T02:41:10.763Z [WARNING]: ####################################
2021-11-17T02:41:10.763Z [WARNING]: ################################      95.8%
2021-11-17T02:41:10.768Z [WARNING]: ####################
2021-11-17T02:41:10.768Z [WARNING]: #################################################### 100.0%
2021-11-17T02:41:10.783Z [WARNING]: Computing checksum with sha256sum
2021-11-17T02:41:10.891Z [WARNING]: Checksums matched!
2021-11-17T02:41:12.125Z [INFO]: Now using node v16.13.0 (npm v8.1.0)
2021-11-17T02:41:12.154Z [INFO]: # Executing command: yarn global add @aws-amplify/cli
2021-11-17T02:41:12.388Z [INFO]: yarn global v1.22.0
2021-11-17T02:41:12.429Z [INFO]: [1/4] Resolving packages...
2021-11-17T02:41:18.158Z [WARNING]: warning @aws-amplify/cli ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:41:18.161Z [WARNING]: warning @aws-amplify/cli > amplify-category-analytics ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
                                    warning @aws-amplify/cli > amplify-category-function ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
                                    warning @aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
                                    warning @aws-amplify/cli > amplify-category-predictions ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
                                    warning @aws-amplify/cli > amplify-category-interactions ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
                                    warning @aws-amplify/cli > @aws-amplify/amplify-category-auth ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
                                    warning @aws-amplify/cli > aws-sdk ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:41:18.292Z [WARNING]: warning @aws-amplify/cli > amplify-app > xcode ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:41:21.018Z [WARNING]: warning @aws-amplify/cli > aws-sdk ><EMAIL_ADDRESS>The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
2021-11-17T02:41:21.025Z [WARNING]: warning @aws-amplify/cli > aws-sdk > url ><EMAIL_ADDRESS>The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
2021-11-17T02:41:21.742Z [WARNING]: warning @aws-amplify/cli > amplify-util-mock > amplify-storage-simulator ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:41:21.755Z [WARNING]: warning @aws-amplify/cli > amplify-util-mock > amplify-appsync-simulator ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:41:22.520Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > @graphql-codegen/core ><EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
                                    warning @aws-amplify/cli > amplify-codegen > @graphql-codegen/core > @graphql-codegen/plugin-helpers ><EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-17T02:41:22.520Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > @graphql-codegen/core > @graphql-toolkit/schema-merging ><EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
                                    warning @aws-amplify/cli > amplify-codegen > amplify-codegen-appsync-model-plugin > @graphql-codegen/visitor-plugin-common > @graphql-codegen/plugin-helpers ><EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-17T02:41:22.580Z [WARNING]: warning @aws-amplify/cli > amplify-provider-awscloudformation > cfn-lint ><EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
2021-11-17T02:41:22.601Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > graphql-config ><EMAIL_ADDRESS>GraphQL Import has been deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-import for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-17T02:41:22.863Z [WARNING]: warning @aws-amplify/cli > amplify-util-mock > amplify-dynamodb-simulator ><EMAIL_ADDRESS>Use promise-toolbox/fromEvent instead
2021-11-17T02:41:22.864Z [WARNING]: warning @aws-amplify/cli > amplify-util-mock > amplify-storage-simulator ><EMAIL_ADDRESS>Use promise-toolbox/fromEvent instead
                                    warning @aws-amplify/cli > amplify-util-mock > amplify-appsync-simulator ><EMAIL_ADDRESS>Use promise-toolbox/fromEvent instead
2021-11-17T02:41:22.985Z [WARNING]: warning @aws-amplify/cli > amplify-util-mock > amplify-appsync-simulator ><EMAIL_ADDRESS>This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
2021-11-17T02:41:22.986Z [WARNING]: warning @aws-amplify/cli > amplify-util-mock > amplify-appsync-simulator > graphql-tools ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:41:23.405Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > amplify-graphql-types-generator > babel-types > babel-runtime ><EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
2021-11-17T02:41:23.409Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > @graphql-codegen/core > @graphql-toolkit/schema-merging > @kamilkisiela/graphql-tools ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:41:23.532Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > amplify-codegen-appsync-model-plugin > @graphql-codegen/visitor-plugin-common > @graphql-toolkit/relay-operation-optimizer ><EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-17T02:41:23.539Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > amplify-codegen-appsync-model-plugin > @graphql-codegen/visitor-plugin-common > @graphql-codegen/plugin-helpers > @graphql-toolkit/common > @ardatan/graphql-tools ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:41:24.215Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > amplify-codegen-appsync-model-plugin > @graphql-codegen/visitor-plugin-common > @graphql-toolkit/relay-operation-optimizer > relay-compiler > fbjs ><EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
2021-11-17T02:41:24.600Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > amplify-codegen-appsync-model-plugin > @graphql-codegen/visitor-plugin-common > @graphql-toolkit/relay-operation-optimizer > relay-compiler > fast-glob > micromatch > snapdragon > source-map-resolve ><EMAIL_ADDRESS>https://github.com/lydell/resolve-url#deprecated
2021-11-17T02:41:24.616Z [WARNING]: warning @aws-amplify/cli > amplify-codegen > amplify-codegen-appsync-model-plugin > @graphql-codegen/visitor-plugin-common > @graphql-toolkit/relay-operation-optimizer > relay-compiler > fast-glob > micromatch > snapdragon > source-map-resolve ><EMAIL_ADDRESS>Please see https://github.com/lydell/urix#deprecated
2021-11-17T02:41:24.736Z [INFO]: [2/4] Fetching packages...
2021-11-17T02:41:42.199Z [WARNING]: warning<EMAIL_ADDRESS>The engine "@aws-amplify/cli" appears to be invalid.
2021-11-17T02:41:42.203Z [INFO]: info<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
2021-11-17T02:41:42.204Z [INFO]: info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
2021-11-17T02:41:42.208Z [INFO]: [3/4] Linking dependencies...
2021-11-17T02:41:42.209Z [WARNING]: warning "@aws-amplify/cli ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>2021-11-17T02:41:42.210Z [WARNING]: warning "@aws-amplify/cli ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>2021-11-17T02:41:42.212Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.212Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.212Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.213Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.214Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.214Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.214Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.215Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.217Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.218Z [WARNING]: warning "@aws-amplify/cli > amplify-category-api ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.219Z [WARNING]: warning "@aws-amplify/cli > amplify-provider-awscloudformation ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.220Z [WARNING]: warning "@aws-amplify/cli > amplify-provider-awscloudformation ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.220Z [WARNING]: warning "@aws-amplify/cli > amplify-provider-awscloudformation ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.222Z [WARNING]: warning "@aws-amplify/cli > @aws-amplify/amplify-category-storage ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.222Z [WARNING]: warning "@aws-amplify/cli > @aws-amplify/amplify-category-storage ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>                                    warning "@aws-amplify/cli > @aws-amplify/amplify-category-storage ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>                                    warning "@aws-amplify/cli > @aws-amplify/amplify-category-storage ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>                                    warning "@aws-amplify/cli > @aws-amplify/amplify-category-storage ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>                                    warning "@aws-amplify/cli > @aws-amplify/amplify-category-storage ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>                                    warning "@aws-amplify/cli > @aws-amplify/amplify-category-storage ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>                                    warning "@aws-amplify/cli > @aws-amplify/amplify-category-storage ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>2021-11-17T02:41:42.227Z [WARNING]: warning "@aws-amplify/cli > amplify-provider-awscloudformation > @aws-amplify/graphql-transformer-interfaces ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.227Z [WARNING]: warning "@aws-amplify/cli > amplify-provider-awscloudformation > @aws-amplify/graphql-transformer-interfaces ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.228Z [WARNING]: warning "@aws-amplify/cli > amplify-provider-awscloudformation > @aws-amplify/graphql-model-transformer ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.228Z [WARNING]: warning "@aws-amplify/cli > amplify-provider-awscloudformation > @aws-amplify/graphql-model-transformer ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:41:42.228Z [WARNING]: warning "@aws-amplify/cli > amplify-provider-awscloudformation > @aws-amplify/graphql-model-transformer ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2021-11-17T02:42:00.562Z [INFO]: [4/4] Building fresh packages...
2021-11-17T02:42:03.185Z [INFO]: success Installed "<EMAIL_ADDRESS>with binaries:
2021-11-17T02:42:03.186Z [INFO]: - amplify
2021-11-17T02:42:03.186Z [INFO]: Done in 50.80s.
2021-11-17T02:42:03.222Z [INFO]: # Executing command: amplify --version
2021-11-17T02:42:08.754Z [INFO]: The following official plugins are missing or inactive:
2021-11-17T02:42:08.756Z [INFO]: awscloudformation: provider |<EMAIL_ADDRESS>                                 analytics: category |<EMAIL_ADDRESS>                                 api: category |<EMAIL_ADDRESS>                                 function: category |<EMAIL_ADDRESS>                                 geo: category |<EMAIL_ADDRESS>                                 hosting: category |<EMAIL_ADDRESS>                                 hosting: category |<EMAIL_ADDRESS>                                 hosting: category |<EMAIL_ADDRESS>                                 interactions: category |<EMAIL_ADDRESS>                                 notifications: category |<EMAIL_ADDRESS>                                 predictions: category |<EMAIL_ADDRESS>                                 xr: category |<EMAIL_ADDRESS>                                 codegen: util |<EMAIL_ADDRESS>                                 flutter: frontend |<EMAIL_ADDRESS>                                 android: frontend |<EMAIL_ADDRESS>                                 ios: frontend |<EMAIL_ADDRESS>                                 javascript: frontend |<EMAIL_ADDRESS>                                 mock: util |<EMAIL_ADDRESS>2021-11-17T02:42:08.815Z [INFO]: 7.3.5
2021-11-17T02:42:09.170Z [INFO]: # Completed phase: preBuild
                                 # Starting phase: build
                                 # Executing command: pwd
                                 /codebuild/output/src517466540/src/akeero-admin
                                 # Executing command: ls -la
2021-11-17T02:42:09.171Z [INFO]: total 796
                                 drwxr-xr-x    8 root root   4096 Nov 17 02:41 .
                                 drwxr-xr-x    3 root root   4096 Nov 17 02:38 ..
                                 drwxr-xr-x    6 root root   4096 Nov 17 02:38 amplify
                                 -rwxrwxrwx    1 root root   4935 Nov 17 02:41 amplify.sh
                                 -rw-r--r--    1 root root   1761 Nov 17 02:40 amplify.yml
                                 -rw-r--r--    1 root root    645 Nov 17 02:38 .editorconfig
                                 -rw-r--r--    1 root root     14 Nov 17 02:38 .eslintignore
                                 -rw-r--r--    1 root root    509 Nov 17 02:38 .eslintrc.json
                                 drwxr-xr-x    8 root root   4096 Nov 17 02:38 .git
                                 -rw-r--r--    1 root root    777 Nov 17 02:38 .gitignore
                                 -rw-r--r--    1 root root    323 Nov 17 02:38 .graphqlconfig.yml
                                 -rw-r--r--    1 root root    273 Nov 17 02:38 jest.config.js
                                 drwxr-xr-x 1194 root root  36864 Nov 17 02:40 node_modules
                                 -rw-r--r--    1 root root   3031 Nov 17 02:38 package.json
                                 -rw-r--r--    1 root root     79 Nov 17 02:38 .prettierrc
                                 drwxr-xr-x    2 root root   4096 Nov 17 02:38 public
                                 -rw-r--r--    1 root root   3899 Nov 17 02:38 README.md
                                 drwxr-xr-x   12 root root   4096 Nov 17 02:38 src
                                 -rw-r--r--    1 root root    874 Nov 17 02:38 tsconfig.json
                                 drwxr-xr-x    2 root root   4096 Nov 17 02:38 .vscode
                                 -rw-r--r--    1 root root 692384 Nov 17 02:38 yarn.lock
2021-11-17T02:42:14.218Z [INFO]: Found no provider plugins
2021-11-17T02:42:14.220Z [INFO]: Run 'amplify plugin scan' to scan your system for provider plugins.
2021-11-17T02:42:14.220Z [INFO]: Failed to pull the backend.
2021-11-17T02:42:14.222Z [INFO]: Found no provider plugins
2021-11-17T02:42:14.222Z [INFO]: Error: Found no provider plugins
                                     at getProvider (/usr/local/share/.config/yarn/global/node_modules/@aws-amplify/cli/lib/attach-backend-steps/a10-queryProvider.js:43:15)
                                     at Object.queryProvider (/usr/local/share/.config/yarn/global/node_modules/@aws-amplify/cli/lib/attach-backend-steps/a10-queryProvider.js:28:28)
                                     at Object.attachBackend (/usr/local/share/.config/yarn/global/node_modules/@aws-amplify/cli/lib/attach-backend.js:38:35)
                                     at Object.run (/usr/local/share/.config/yarn/global/node_modules/@aws-amplify/cli/lib/commands/pull.js:64:32)
                                     at Object.executeAmplifyCommand (/usr/local/share/.config/yarn/global/node_modules/@aws-amplify/cli/lib/index.js:288:29)
                                     at processTicksAndRejections (node:internal/process/task_queues:96:5)
                                     at async executePluginModuleCommand (/usr/local/share/.config/yarn/global/node_modules/@aws-amplify/cli/lib/execution-manager.js:187:5)
                                     at async Object.executeCommand (/usr/local/share/.config/yarn/global/node_modules/@aws-amplify/cli/lib/execution-manager.js:35:9)
                                     at async Object.run (/usr/local/share/.config/yarn/global/node_modules/@aws-amplify/cli/lib/index.js:162:9)
2021-11-17T02:42:14.239Z [ERROR]: !!! Build failed
2021-11-17T02:42:14.239Z [ERROR]: !!! Non-Zero Exit Code detected
2021-11-17T02:42:14.239Z [INFO]: # Starting environment caching...
2021-11-17T02:42:14.240Z [INFO]: # Uploading environment cache artifact...
2021-11-17T02:42:14.305Z [INFO]: # Environment caching completed
Terminating logging...

Additional information
Above is extracted from this build: eu-west-1#/d16xma096tmdk6/feature-sc-1422/21
The previous 20 builds may also be relevant as they were other attempts to solve the same issue.
Side Issue: Cloning Repository Step marked as successful

Logs from: eu-west-1#/d16xma096tmdk6/prod/15
# Put your logs below this line

2021-11-16T19:34:40.245Z [INFO]: Git SSH Key acquired
2021-11-16T19:34:40.321Z [INFO]: # Cloning repository: git@github.com:Akeero/akeero-admin.git
2021-11-16T19:34:40.374Z [INFO]: Agent pid 136
2021-11-16T19:34:40.396Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
2021-11-16T19:34:40.583Z [INFO]: Cloning into 'akeero-admin'...
2021-11-16T19:34:41.097Z [INFO]: Warning: Permanently added the ECDSA host key for IP address '<IP_ADDRESS>' to the list of known hosts.
2021-11-16T19:34:43.412Z [INFO]: # Switching to commit: a723c66142bb1f4aca3306c0f418274016c3ca3f
2021-11-16T19:34:43.442Z [INFO]: Agent pid 149
2021-11-16T19:34:43.516Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
                                 Note: switching to 'a723c66142bb1f4aca3306c0f418274016c3ca3f'.
                                 You are in 'detached HEAD' state. You can look around, make experimental
                                 changes and commit them, and you can discard any commits you make in this
                                 state without impacting any branches by switching back to a branch.
                                 If you want to create a new branch to retain commits you create, you may
                                 do so (now or later) by using -c with the switch command. Example:
                                 git switch -c <new-branch-name>
                                 Or undo this operation with:
                                 git switch -
                                 Turn off this advice by setting config variable advice.detachedHead to false
                                 HEAD is now at a723c66 Merge pull request #59 from Akeero/main
2021-11-16T19:34:43.522Z [INFO]: Successfully cleaned up Git credentials
2021-11-16T19:34:43.522Z [INFO]: # Checking for Git submodules at: /codebuild/output/src793049893/src/akeero-admin/.gitmodules
2021-11-16T19:34:43.543Z [INFO]: # Retrieving environment cache...
2021-11-16T19:34:43.600Z [INFO]: # Retrieved environment cache
2021-11-16T19:34:43.601Z [INFO]: ---- Setting Up SSM Secrets ----
2021-11-16T19:34:43.601Z [INFO]: SSM params {"Path":"/amplify/d16xma096tmdk6/prod/","WithDecryption":true}
2021-11-16T19:34:43.687Z [INFO]: # Determining if there are buildable backend changes in the amplify directory of the repository...
2021-11-16T19:34:43.738Z [INFO]: # Last built commit: 60f015922856c72f7c1f2bc7924037c5a433ab9e
2021-11-16T19:34:43.744Z [INFO]: # Differences detected.
2021-11-16T19:34:43.745Z [INFO]: # Continuing with backend build...
2021-11-16T19:34:49.710Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 4.29.4 to 7.3.3...
2021-11-16T19:35:30.587Z [INFO]: npm WARN deprecated<EMAIL_ADDRESS>GraphQL Import has been deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-import for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-16T19:35:46.143Z [INFO]: npm WARN deprecated<EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-16T19:35:50.584Z [INFO]: npm WARN deprecated<EMAIL_ADDRESS>https://github.com/lydell/resolve-url#deprecated
2021-11-16T19:35:50.599Z [INFO]: npm WARN
2021-11-16T19:35:50.600Z [INFO]: deprecated<EMAIL_ADDRESS>Please see https://github.com/lydell/urix#deprecated
2021-11-16T19:35:51.057Z [INFO]: npm WARN deprecated<EMAIL_ADDRESS>core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
2021-11-16T19:35:52.945Z [INFO]: npm
2021-11-16T19:35:52.946Z [INFO]: WARN deprecated<EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-16T19:35:58.689Z [INFO]: npm
2021-11-16T19:35:58.691Z [INFO]: WARN deprecated<EMAIL_ADDRESS>Use promise-toolbox/fromEvent instead
2021-11-16T19:36:58.819Z [INFO]: npm
2021-11-16T19:36:58.821Z [INFO]: WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/@aws-amplify/cli/node_modules/chokidar/node_modules/fsevents):
                                 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2021-11-16T19:36:58.827Z [INFO]: npm
2021-11-16T19:36:58.828Z [INFO]: WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
2021-11-16T19:36:58.833Z [INFO]: npm
2021-11-16T19:36:58.834Z [INFO]: WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
2021-11-16T19:36:58.834Z [INFO]:
2021-11-16T19:36:58.934Z [INFO]: # Done patching NPM package '@aws-amplify/cli' to version 7.3.3
2021-11-16T19:36:58.947Z [INFO]: # Retrieving cache...
2021-11-16T19:37:06.791Z [INFO]: # Extracting cache...
2021-11-16T19:37:13.402Z [INFO]: # Extraction completed

@chrismilleruk Could you please use npm install -g @aws-amplify/cli instead of using yarn and if you're still experiencing this issue? We've seen issues with yarn installations in the past like this one - https://github.com/aws-amplify/amplify-cli/issues/8942

@kaustavghosh06 yes, I switched to yarn after npm i -g @aws-amplify/cli failed, here is the buildspec and logs from that run:

Buildspec
version: 1
backend:
  phases:
    preBuild:
      commands:
        - "# Check Versions"
        - node --version
        - npm --version
        - yarn --version
        - which amplify
        - amplify --version
        - nvm install 16
        - nvm use 16
        - npm install -g @aws-amplify/cli@latest
        - amplify --version
    build:
      commands:
        - "# Execute Amplify CLI with the helper script"
        - pwd
        - ls -la
        - amplifyPush --simple
  ...

 Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-import for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-17T02:09:43.671Z [WARNING]: npm WARN
2021-11-17T02:09:43.672Z [WARNING]: deprecated<EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:09:43.737Z [WARNING]: npm WARN
2021-11-17T02:09:43.737Z [WARNING]: deprecated<EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-17T02:09:43.737Z [WARNING]: npm
2021-11-17T02:09:43.737Z [WARNING]: WARN deprecated<EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-17T02:09:43.787Z [WARNING]: npm WARN
2021-11-17T02:09:43.788Z [WARNING]: deprecated<EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-11-17T02:09:45.290Z [WARNING]: npm WARN
2021-11-17T02:09:45.290Z [WARNING]: deprecated<EMAIL_ADDRESS>GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-11-17T02:09:46.858Z [WARNING]: npm
2021-11-17T02:09:46.859Z [WARNING]: WARN deprecated<EMAIL_ADDRESS>This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
2021-11-17T02:09:56.325Z [WARNING]: npm WARN deprecated<EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
2021-11-17T02:09:56.327Z [WARNING]: npm WARN deprecated<EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
                                    npm WARN deprecated<EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
2021-11-17T02:10:01.036Z [WARNING]: npm
2021-11-17T02:10:01.039Z [WARNING]: ERR! code 127
                                    npm ERR! path /root/.nvm/versions/node/v16.13.0/lib/node_modules/@aws-amplify/cli/node_modules/babel-runtime/node_modules/core-js
                                    npm ERR! command failed
                                    npm ERR! command sh -c node -e "try{require('./postinstall')}catch(e){}"
                                    npm ERR! sh: node: command not found
2021-11-17T02:10:01.111Z [WARNING]:
2021-11-17T02:10:01.112Z [WARNING]: npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /root/.npm/_logs/2021-11-17T02_10_01_051Z-debug.log
2021-11-17T02:10:01.112Z [HELP]: Outputting the npm debug log
                                 0 verbose cli [
                                 0 verbose cli   '/root/.nvm/versions/node/v16.13.0/bin/node',
...
                                 6858 verbose pkgid<EMAIL_ADDRESS>                                 6859 verbose cwd /codebuild/output/src313861280/src/akeero-admin
                                 6860 verbose Linux 4.14.248-189.473.amzn2.x86_64
                                 6861 verbose argv "/root/.nvm/versions/node/v16.13.0/bin/node" "/root/.nvm/versions/node/v16.13.0/bin/npm" "install" "-g" "@aws-amplify/cli@latest"
                                 6862 verbose node v16.13.0
                                 6863 verbose npm  v8.1.0
                                 6864 error code 127
                                 6865 error path /root/.nvm/versions/node/v16.13.0/lib/node_modules/@aws-amplify/cli/node_modules/babel-runtime/node_modules/core-js
                                 6866 error command failed
                                 6867 error command sh -c node -e "try{require('./postinstall')}catch(e){}"
                                 6868 error sh: node: command not found
                                 6869 verbose exit 127
2021-11-17T02:10:01.172Z [ERROR]: !!! Build failed
2021-11-17T02:10:01.172Z [ERROR]: !!! Non-Zero Exit Code detected
2021-11-17T02:10:01.172Z [INFO]: # Starting environment caching...
2021-11-17T02:10:01.173Z [INFO]: # Uploading environment cache artifact...
2021-11-17T02:10:01.231Z [INFO]: # Environment caching completed
Terminating logging...

@chrismilleruk Does it work with the default Node version which Amplify build provides and NPM CLI installation?

It's a reasonable question but it might be trying to create a workaround / resolve a different issue.  Specifically (& rather sarcastically), "...upgrade Node AND Amplify prior to amplifyPush in build" definitely does not work if we use the "default Node version which Amplify build provides and NPM CLI installation." 😁
... however, for your info, my specific use case & background:
In our case, the correct & specific version of tsc is required for this build step:

snippet from https://docs.amplify.aws/cli/function/build-options/
{
  "scripts": {
    "amplify:generateReport": "cd amplify/backend/function/generateReport && tsc -p ./tsconfig.json && cd -"
  },
}

The specific tsc version we need is stored in the package.json file so a simple npm install -g typescript against node 12 doesn't really work for me as it will introduce inconsistencies.
npm install with the default 'NPM CLI installation' produces errors due to a package-lock.json version conflict.
I'm not too keen to look at any temporary workarounds for this issue since a recent opaque change to _LIVE_UPDATES caused a build pipeline to fail spectacularly, in prod, 24h before a conference.
I've disabled lambda pre-build for now and I'm looking for a robust way to upgrade the build container to the correct versions prior to running the build. Preferably without installing the same thing multiple times against different versions.
I hope this helps & provides the background context you need to understand why I'm attempting to upgrade node & reinstall amplify at this point in the build.

@kaustavghosh06 thanks in advance for your help and let me know if I can add any more info for you.

Hi @chrismilleruk, is it possible for you to use node 14? Please let us know if you're still having issues after that.

Hey @chrismilleruk :wave: as a workaround can you try adding the string "packaged-node-modules" to the pluginDirectories section of the ~/.amplify/plugins.json file and try to redeploy?
{
  "pluginDirectories": [
    "cli-local-node-modules",
    "cli-parent-directory",
    "global-node-modules",
+   "packaged-node-modules"
  ],
  // ...
}

For reference: https://github.com/josefaidt/9209/blob/main/scripts/patch.js

@lazpavel, @josefaidt 👋
Apologies for the slow response. I've created a ticket to try these approaches and will let you know how it goes.

Hi @josefaidt, @lazpavel, I've had a chance to revisit this and test some more this evening, with mixed results. There seem to be a few things overlapping here so I did some brute force testing to try and isolate the key factors.
A quick reminder that the goal (for me at least) is to upgrade node (Active LTS: v16, Current: v17) with a working amplify CLI at preBuild. The two workarounds mentioned are "use node 14" and "add the string "packaged-node-modules" to the pluginDirectories section of the ~/.amplify/plugins.json".
The patch seems to be non-impacting from what I can tell. The target version of Node (and NPM) coupled with the amplify-cli install method seems to have the greatest impact & correlation.
I see also that the main build provision script has been updated and the default version of node is now v14.18.1 instead of v12.21.0. A great improvement 👏. We need to nvm install something in order to cause the issue so I have just performed a nvm install 14.18.3.
Variations explored
NO PATCH OR node install-9209-patch.js
nvm install 16 OR nvm install 14.18.3 OR nvm use 16
NO AMPLIFY INSTALL OR npm install -g @aws-amplify/cli@latest OR yarn global add @aws-amplify/cli OR npm config set user 0 && npm config set unsafe-perm true && npm install -g @aws-amplify/cli@latest
Test command
amplify --version
Successful combos
nvm install 14 with npm install -g
If you want a minor or patch update to v14, use npm install -g.
node install-9209-patch.js + nvm install 14.18.3 + npm install -g @aws-amplify/cli@latest
NO PATCH + nvm install 14.18.3 + npm install -g @aws-amplify/cli@latest

Success 🆗
node v14.18.3 (npm v6.14.15)

version: 1
backend:
  phases:
    preBuild:
      commands:
        - "# Check Versions"
        - node --version
        - npm --version
        - yarn --version
        - amplify --version
        - "# Upgrade from 14.18.1 to 14.x"
        - nvm install 14
        - npm install -g @aws-amplify/cli@latest
        - amplify --version

nvm install 16 with yarn global add
If you want to upgrade to v16, use yarn global add.
node install-9209-patch.js + nvm install 16 + yarn global add @aws-amplify/cli
NO PATCH + nvm install 16 + yarn global add @aws-amplify/cli

Success 🆗
node v16.13.2 (npm v8.1.2)
<EMAIL_ADDRESS>
version: 1
backend:
  phases:
    preBuild:
      commands:
        - "# Check Versions"
        - node --version
        - npm --version
        - yarn --version
        - amplify --version
        - "# Upgrade from 14.18.1 to 16.x"
        - nvm install 16
        - yarn global add @aws-amplify/cli
        - amplify --version

nvm use 16 with npm config set unsafe-perm true
It is also possible to nvm _use_ 16 to access v16.13.0 since it is preinstalled but it requires some fairly hefty gymnastics.
node install-9209-patch.js + nvm use 16 + npm config set user 0 && npm config set unsafe-perm true && npm install -g @aws-amplify/cli@latest
NO PATCH + nvm use 16 + npm config set user 0 && npm config set unsafe-perm true && npm install -g @aws-amplify/cli@latest

Success 🆗
node v16.13.0 (npm v8.1.0)
amplify --version > 7.6.12

version: 1
backend:
  phases:
    preBuild:
      commands:
        - "# Check Versions"
        - node --version
        - npm --version
        - yarn --version
        - amplify --version
        - "# Switch from 14.18.1 to 16.13.0"
        - nvm use 16
        - npm config set user 0 && npm config set unsafe-perm true && npm install -g @aws-amplify/cli@latest
        - amplify --version

Details of all runs

All attempts and a brief summary of each error
NO PATCH + nvm install 16 + NO AMPLIFY INSTALL

amplify.sh: line 23: amplify: command not found

node install-9209-patch.js + nvm install 16 + NO AMPLIFY INSTALL

amplify.sh: line 26: amplify: command not found

node install-9209-patch.js + nvm install 16 + npm install -g @aws-amplify/cli@latest
 6883 verbose pkgid<EMAIL_ADDRESS>...
 6890 error path /root/.nvm/versions/node/v16.13.2/lib/node_modules/@aws-amplify/cli/node_modules/babel-runtime/node_modules/core-js
 6891 error command failed
 6892 error command sh -c node -e "try{require('./postinstall')}catch(e){}"
 6893 error sh: node: command not found
 6894 verbose exit 127

node install-9209-patch.js + nvm install 14.18.3 + npm install -g @aws-amplify/cli@latest

Success 🆗
node v14.18.3 (npm v6.14.15)

NO PATCH + nvm install 14.18.3 + npm install -g @aws-amplify/cli@latest

Success 🆗
node v14.18.3 (npm v6.14.15)

NO PATCH + nvm install 14.18.3 + yarn global add @aws-amplify/cli
2022-01-26T00:51:14.524Z [INFO]: # Executing command: amplify --version
2022-01-26T00:51:20.313Z [INFO]: The following official plugins are missing or inactive:
2022-01-26T00:51:20.315Z [INFO]: awscloudformation: provider |<EMAIL_ADDRESS>                                 analytics: category |<EMAIL_ADDRESS>                                 function: category |<EMAIL_ADDRESS>...
                                 javascript: frontend |<EMAIL_ADDRESS>                                 mock: util |<EMAIL_ADDRESS>
node install-9209-patch.js + nvm install 14.18.3 + yarn global add @aws-amplify/cli
2022-01-26T00:51:14.524Z [INFO]: # Executing command: amplify --version
2022-01-26T00:51:20.313Z [INFO]: The following official plugins are missing or inactive:
2022-01-26T00:51:20.315Z [INFO]: awscloudformation: provider |<EMAIL_ADDRESS>                                 analytics: category |<EMAIL_ADDRESS>                                 function: category |<EMAIL_ADDRESS>...
                                 javascript: frontend |<EMAIL_ADDRESS>                                 mock: util |<EMAIL_ADDRESS>
node install-9209-patch.js + nvm install 16 + yarn global add @aws-amplify/cli

Success 🆗
node v16.13.2 (npm v8.1.2)
<EMAIL_ADDRESS>
node install-9209-patch.js + nvm install 16 + npm install -g @aws-amplify/cli@latest
 6883 verbose pkgid<EMAIL_ADDRESS>...
 6892 error command sh -c node -e "try{require('./postinstall')}catch(e){}"
 6893 error sh: node: command not found
 6894 verbose exit 127

node install-9209-patch.js + nvm install 16 + npm config set user 0 && npm config set unsafe-perm true && npm install -g @aws-amplify/cli@latest
 6883 verbose pkgid<EMAIL_ADDRESS>...
 6892 error command sh -c node -e "try{require('./postinstall')}catch(e){}"
 6893 error sh: node: command not found
 6894 verbose exit 127

node install-9209-patch.js + nvm use 16 + NO AMPLIFY INSTALL
2022-01-26T01:50:50.025Z [INFO]: # Executing command: nvm use 16
2022-01-26T01:50:54.119Z [INFO]: Now using node v16.13.0 (npm v8.1.0)
2022-01-26T01:50:54.121Z [INFO]: # Executing command: amplify --version
2022-01-26T01:51:09.310Z [INFO]: Invalid feature flag configuration
2022-01-26T01:51:09.313Z [INFO]: These feature flags are defined in the "amplify/cli.json" configuration file and are unknown to the currently running Amplify CLI:
                                   - project
                                 This issue likely happens when the project has been pushed with a newer version of Amplify CLI, try updating to a newer version.
                                 Ensure that the CI/CD pipeline is not using an older or pinned down version of Amplify CLI.
                                 Learn more about feature flags: https://docs.amplify.aws/cli/reference/feature-flags
2022-01-26T01:51:09.323Z [ERROR]: !!! Build failed
2022-01-26T01:51:09.323Z [ERROR]: !!! Non-Zero Exit Code detected

node install-9209-patch.js + nvm use 16 + npm config set user 0 && npm config set unsafe-perm true && npm install -g @aws-amplify/cli@latest

Success 🆗
node v16.13.0 (npm v8.1.0)
amplify --version > 7.6.12

NO PATCH + nvm use 16 + npm config set user 0 && npm config set unsafe-perm true && npm install -g @aws-amplify/cli@latest

Success 🆗
node v16.13.0 (npm v8.1.0)
amplify --version > 7.6.12

NO PATCH + nvm use 16 + yarn global add @aws-amplify/cli
success Installed "<EMAIL_ADDRESS>with binaries:
2022-01-26T02:44:51.930Z [INFO]: - amplify
2022-01-26T02:44:51.931Z [INFO]: Done in 46.13s.
2022-01-26T02:44:51.983Z [INFO]: # Executing command: amplify --version
2022-01-26T02:45:15.079Z [INFO]: Invalid feature flag configuration
2022-01-26T02:45:15.085Z [INFO]: These feature flags are defined in the "amplify/cli.json" configuration file and are unknown to the currently running Amplify CLI:
                                   - project
                                 This issue likely happens when the project has been pushed with a newer version of Amplify CLI, try updating to a newer version.
                                 Ensure that the CI/CD pipeline is not using an older or pinned down version of Amplify CLI.
                                 Learn more about feature flags: https://docs.amplify.aws/cli/reference/feature-flags

NO PATCH + nvm install 16 + yarn global add @aws-amplify/cli
# Executing command: amplify --version
2022-01-26T02:57:26.427Z [INFO]: The following official plugins are missing or inactive:
2022-01-26T02:57:26.430Z [INFO]: awscloudformation: provider |<EMAIL_ADDRESS>                                 analytics: category |<EMAIL_ADDRESS>                                 ...

Hey @josefaidt, No problem, sorry for the blogpost..
Just checking again with a clear head and I can see I was slightly wrong. The patch in fact DID work for v16 but not for v14.
I've updated the summary above and copied the run results below.
Thanks again
Chris
The following is copied from (All attempts and a brief summary of each error) above.
NO PATCH + nvm install 14.18.3 + yarn global add @aws-amplify/cli
2022-01-26T00:51:14.524Z [INFO]: # Executing command: amplify --version
2022-01-26T00:51:20.313Z [INFO]: The following official plugins are missing or inactive:
2022-01-26T00:51:20.315Z [INFO]: awscloudformation: provider |<EMAIL_ADDRESS>                                 analytics: category |<EMAIL_ADDRESS>                                 function: category |<EMAIL_ADDRESS>...
                                 javascript: frontend |<EMAIL_ADDRESS>                                 mock: util |<EMAIL_ADDRESS>
node install-9209-patch.js + nvm install 14.18.3 + yarn global add @aws-amplify/cli
2022-01-26T00:51:14.524Z [INFO]: # Executing command: amplify --version
2022-01-26T00:51:20.313Z [INFO]: The following official plugins are missing or inactive:
2022-01-26T00:51:20.315Z [INFO]: awscloudformation: provider |<EMAIL_ADDRESS>                                 analytics: category |<EMAIL_ADDRESS>                                 function: category |<EMAIL_ADDRESS>...
                                 javascript: frontend |<EMAIL_ADDRESS>                                 mock: util |<EMAIL_ADDRESS>
NO PATCH + nvm install 16 + yarn global add @aws-amplify/cli
# Executing command: amplify --version
2022-01-26T02:57:26.427Z [INFO]: The following official plugins are missing or inactive:
2022-01-26T02:57:26.430Z [INFO]: awscloudformation: provider |<EMAIL_ADDRESS>                                 analytics: category |<EMAIL_ADDRESS>                                 ...

node install-9209-patch.js + nvm install 16 + yarn global add @aws-amplify/cli

Success 🆗
node v16.13.2 (npm v8.1.2)
<EMAIL_ADDRESS>

I've updated the summary comment above for future readers.

Future readers:
I've managed to get next 14 working on amplify without needing to create custom image hosted on ECR... Just use the public.ecr.aws/sam/build-nodejs[version].x:latest images.
E.g., 18.x latest
    EnvironmentVariables:
        - Name: _CUSTOM_IMAGE
          Value: "public.ecr.aws/sam/build-nodejs18.x:latest"

I hope this finds you well :)


Warning: invalid next.config.js options detected

When I start my Next.js app, I receive this warning:
warn  - Invalid next.config.js options detected:
[
  {
    "instancePath": "",
    "schemaPath": "#/additionalProperties",
    "keyword": "additionalProperties",
    "params": {
      "additionalProperty": "lessVarsFilePath"
    },
    "message": "must NOT have additional properties"
  }
]
See more info here: https://nextjs.org/docs/messages/invalid-next-config

My next.config.js file looks like this:
const withAntdLess = require("next-plugin-antd-less");

const config = {
    lessVarsFilePath: "./src/front-end/styles/antd-variables.less",

    webpack(config) {
        return config;
    },

    images: {
        domains: ["images.ctfassets.net"],
    },
};

module.exports = withAntdLess(config);

+1

I also started to experience these messages after update of Next. It seems that even Next 12.2.4 hasn't fixed that yet.

yep still on next 12.2.4

The same for 12.2.5

This seems to be more of a problem with next-plugin-antd-less than next itself.
I think in 12.2.2 next added warnings for extending the config with other keys, and this is a plugin that does that but shouldn't.
Still happening in next 12.3.1 and this seems to be abandoned?

+1

Same issue, anyone found any solutions for this? And should i be worried about this ?

Upgrade to latest Ant Design Version, You may not need this anymore(can configure designs with a provider)

Upgrade to latest Ant Design Version, You may not need this anymore(can configure designs with a provider)

By latest ants version you version 5?
Well Im afraid to mess stuff up by upgrading

By latest ants version you version 5?

Yeah, for my usecase we had also some breaking changes. But did it anyway because it was annoying


perf(settings): deprecate index template creation environment variable

This PR shows a log warning when environment variable DISABLE_ES_INDEX_TEMPLATE_CREATION is enabled, since won't be used anymore.
NOTE: Since changes included in this PR, tests have become unstable and were failing all the time. So I've included changes in tests to fix problems. The main change is define the mocked client as fixture and inject in all related tests.

This PR also includes some logging changes, is this wanted?

This PR also includes some logging changes, is this wanted?

Yes, we setup the logging configuration prior in order to show early warning messages with new format. That's the reason of changes.

👍 I think the tests/test_something.py should not be included, right?

Good catch!. Removed out


Fixing loopout length text on firefox; closes #462

I tested this again and for some reason this code doesn't work for loopout lengths less than 4 which are on the same helix. I'll debug and update this.

I tested this code again and for some reason it does not format loopout lengths less than 4 which are on the same helix the right way. I'll debug and update this issue.

It looks like the dx attribute makes the text curve along the loopout for the above case. Not sure how to fix this.


cant use bool and string in a variant

i cant use below code:
variant<int, double, string, bool> a = "Test";
but when i remove bool variable type it works fine!

variant<int, double, string, bool> a = "Test";

is ambiguous, because the compiler has two equally good conversions available:
a) const char* to bool (implicit pointer-to-bool conversion)
b) const char* to std::string (using std::string conversion constructor)
You need to disambiguate it yourself, e.g.:
variant<int, double, string, bool> a = string("Test");


Narrow rspec dependency

These changes should fix #135. Commit messages have the details. :)

Thanks! :)


RDKG-115 training hardware

Hi,
I want to know if it'd be feasible to train the model as you describe with a single GPU in a reasonable time (a few hours). I've been reading about other KGE models which require a very powerful hardware, but I don't know how it is with this model.
thanks

The xxBERT parameters are pre-trained and then fixed, and it is sufficient for this model to train on a single GPU (11G).


[3.2] Trigger broadphase update when changing collision layer/mask.

3.2 version of #39894.

Thanks!


azure exec container instance with Python error no attribute 'container'

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az container exec
Errors:
The command failed with an unexpected error. Here is the traceback:
'ContainerInstanceManagementClient' object has no attribute 'container'
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/container/custom.py", line 609, in container_exec
    container_client = cf_container(cmd.cli_ctx)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/container/_client_factory.py", line 18, in cf_container
    return _container_instance_client_factory(cli_ctx).container
AttributeError: 'ContainerInstanceManagementClient' object has no attribute 'container'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az container exec --resource-group {} --name {} --exec-command {}

Expected Behavior
Environment Summary
Linux-5.4.0-1061-azure-x86_64-with-debian-10.2 (Cloud Shell), Common Base Linux Delridge (quinault)
Python 3.6.10
Installer: DEB

azure-cli 2.28.0 *

Extensions:
ai-examples 0.2.5
ssh 0.1.6

Additional Context

route to service team

@vribeirocmp Looks like this has since been fixed and I can confirm that there is no error now. Apologies for no updates on this issue sooner. Unless you are still seeing this error on your end with the latest version, I believe this could be closed.


Is there a fast way to get system used size or blocks ?

I have tried lfs_fs_size but it is too slow when there are thousands of files.
Is there a way that I can access the file system used size or blocks from RAM directly ?
By the way, is there any useful information from struct lfs_free ?

Hi @xiaoyanhao, unfortunately no. littlefs doesn't know how many blocks are in use without scanning the filesystem (which is what makes this costly).
The struct lfs_free holds a small bitmap of blocks (also called the lookahead buffer) it knows are free based on the last scan. But it doesn't have a complete picture of the filesystem since littlefs doesn't know when exactly blocks stop being depended on.
Even if you set the lookahead buffer to the size of the disk, it would start to fill up with unknown blocks until littlefs scans the filesystem to reestablish knowledge of what is in use.

The underlying scaling issue was first brought up here:
https://github.com/littlefs-project/littlefs/issues/75
The eventual solution will likely involve making littlefs determine when blocks are no longer in use eagerly, but gets complicated due to multiple open files. It would also block some requested features that depend on copy-on-write behavior, but that may be necessary due to the performance cost.


Hiring ribbon is on top of company name

As you can see, hiring label hides a part of the text for company name. Should we change this or is it as intended?
@doomspork / @tajchumber / @burden thoughts?

In my vision the label is important, but maybe should be in another position to avoid hiding the company name.
What about use Ribbon in this position?

I like the proposed angled ribbon @lccezinha!

just remember that if the company name is very long it can still go under the ribbon!
To make sure it doesn't add some margin-right to the company name!

Is there an icon we could use that that would indicate hiring, something that could go next to the name?

According to the google images

@doomspork I think the ribbon is a better solution as it's more explicit

:thinking: But that icon could be useful in our developer listing...

Closed in #484


Ancestry Plots relies on input_datasets, which will be deprecated

input_datasets will be deprecated, and replaced with input_cohorts.
Ancestry plots relies on this param existing
https://github.com/populationgenomics/production-pipelines/blob/0ee315ef5de6c390cfa834057a219268c04d76d3/cpg_workflows/large_cohort/ancestry_plots.py#L99
This code needs to be updated accordingly.

Hold off on making this change until PA team has finished creating their cohorts. Slack thread for context


Change variable name type -> storetype?

type is a Python builtin and it's better to avoid the name collision.

I agree that this was likely not a good choice for the parameter name. Changing this now would mean breaking the API, though. I'm not convinced that this is warranted here.


Typing.com Project description about the research question, descripti…

…ve stats, modeling, trends seen by grade level and other demographics, outcomes, and recommendations.

typing.com project description


Contacts birthday date

Contact birthday date pickup form shows only min. 2005 year

Please read https://github.com/owncloud/core/blob/master/CONTRIBUTING.md#submitting-issues before submitting bugs.


Response breaks on Windows powershell

The response seem to be breaking when running it  on windows.
PS C:\Users\r.charan\Documents\terminal-wiki\terminal-wiki\src> python.exe .\wiki.py Gandhi
Here are the results for: "Gandhi"
←[1m1. ←[36mMahatma Gandhi←[39m←[0m - Mohandas Karamchand Gandhi (ISO: Mōhanadāsa Karamacaṁda Gāṁdhī; 2 October 1869 – 30 January 1948) was an Indian lawyer, anti-colonial nationalist and political...

←[1m2. ←[36mIndira Gandhi←[39m←[0m - Indira Gandhi (Hindi: [ˈɪndɪɾɑː ˈɡɑːndʱi] ; née Nehru; 19 November 1917 – 31 October 1984) was an Indian politician who served as the third Prime Minister...

←[1m3. ←[36mNehru–Gandhi family←[39m←[0m - The Nehru–Gandhi family is an Indian political family that has occupied a prominent place in the politics of India. The involvement of the family has traditionally...

←[1m4. ←[36mSonia Gandhi←[39m←[0m - Sonia Gandhi (Hindi: [ˈsoːnɪjaː ˈɡaːndʱiː], Italian: [ˈsɔːnja ˈɡandi]; née Maino [ˈmaino]; born 9 December 1946) is an Indian politician. She is the longest-serving...

←[1m5. ←[36mPriyanka Gandhi←[39m←[0m - Prime Minister of India Rajiv Gandhi and Sonia Gandhi, sister of Rahul Gandhi, and granddaughter of Feroze and Indira Gandhi, making her a member of the...

←[1m6. ←[36mRajiv Gandhi←[39m←[0m - Rajiv Gandhi (Hindi pronunciation: [raːdʒiːʋ ɡaːndʱiː] ; 20 August 1944 – 21 May 1991) was an Indian politician who served as the 6th Prime Minister of...

←[1m7. ←[36mRahul Gandhi←[39m←[0m - Rahul Rajiv Gandhi (Hindi pronunciation: [ˈraːɦʊl raːdʒiːʋ ˈɡaːndʱiː] ; born 19 June 1970) is an Indian politician and a member of the Indian Parliament...

←[1m8. ←[36mFeroze Gandhi←[39m←[0m - Feroze Gandhi (born Feroze Gandhy; 12 September 1912 – 8 September 1960) was an Indian freedom fighter, politician and journalist. Gandhi published the...

←[1m9. ←[36mManeka Gandhi←[39m←[0m - Maneka Gandhi (also spelled Menaka; née Anand) (born 26 August 1956) is an Indian politician, animal rights activist, and environmentalist. She is a member...

←[1m10. ←[36mSanjay Gandhi←[39m←[0m - Sanjay Gandhi (14 December 1946 – 23 June 1980) was an Indian politician and the younger son of Indira Gandhi and Feroze Gandhi. He was a member of parliament...

Okay, it seems to be fairly simple.
Fixed the bug: https://github.com/charanravi-online/terminal-wiki/commit/336d620cb6e393a4656c0f8498a6a88309d89891


Model in training status, "unknown training file format : unk for file"

Rasa NLU version : "0.10.0" Docker latest full
Used backend / pipeline : "nlp_spacy", "tokenizer_spacy", "intent_featurizer_spacy", "ner_crf", "ner_synonyms", "intent_classifier_sklearn", "ner_duckling"
Operating system (windows, osx, ...): Ubuntu 16.04, docker version 17.03.1-ce
Issue: When trying to train a new project it is giving the following error on post request.
{"error": "unknown training file format : unk for file /tmp/tmpy31sXe_training_data"}
I am trying to train a new project using the tutorial found in https://rasahq.github.io/rasa_nlu/http.html#post-train
curl -XPOST localhost:5000/train?project=my_project -d demo-rasa.json
When checking the status, using http://localhost:5000/status
{"available_projects": "default": {"status": "ready", "available_models": ["model_20171006-062344"]}, "my_project": {"status": "training", "available_models": ["fallback"]}}}
"my_project" is not in ready status, remains in training status.
Config.json
config.txt

You're just missing the @ symbol in your request which is a curl specific instruction to load the content of the file at the relative path demo-rasa.json :
$ curl -XPOST localhost:5000/train?project=my_project -d @data/examples/rasa/demo-rasa.json

@PHLF is right - but the project shouldn't get stuck in training status. See #652

I guess this is fixed now :)

@PHLF thanks for the support. Solution worked!


dyld library not loaded when run on actual device after Xcode 14

After Xcode 14 when you run on actual device with cargo apple run or just with Xcode.
The app will crash with error of dyld library not loaded.
This is probably related to this SO issue.
As a work around, we can just build staticlib when compiling the target. But this bring noticeable delay when startup.
To really solve the issue, we need to make sure .dylib is located in the package with .a

Closed by #59


use exec to run tailwind binary, so return codes pass through

We are encountering issues where our CI pipeline can succeed without successfully building Tailwind. It appears this is possible because the TAILWIND_COMPILE_COMMAND is run with system and the return code is never checked. When problems occur, an error is printed to the console but the return code from running rails tailwindcss:build is still 0.
Build errors, such as those caused by a version mismatch between the tailwindcss-rails and the corresponding binary gem, could cause a CI build to fail silently and lead to an unstyled site in production. Therefore I believe it is essential that these rake tasks pass through the return code.
Using Kernel#exec replaces the current process by running the given external command, thereby passing through any return codes. If this is unacceptable, another solution would be to add the exception: true flag to the system call.

I just want to note that there's no test coverage on these rake tasks, and I have mild concerns that exec behaves differently on windows than it will on posix-y systems, see for example https://github.com/rubys/sprockets-esbuild/pull/4
If someone can give this a whirl on a Windows machine and comment here I'd feel much more comfortable about it. Or, probably preferably, we should actually exercise these rake tests in the test suite, and I apologize that I don't have the bandwidth to do that work right now.

Confirmed that there is no change in behavior when using exec in the rake task.
This is running via cmd with Windows 10.0.19041, Ruby 3.1.2(x64-mingw-ucrt)

:+1: Thank you for checking!


Sameer Mahajan 473

fix breakages due to breaking changes in latest pandas

I new to python and trying to learn and run heathcareai libraries. I am facing the same issue when running example 1. Any advice


Right To Left in PDF export

hi
i am using mpdf driver with blade template and want to set RTL
i tried dir='RTL' in html and $sheet->setRightToLeft(true) but didn't worked
i like to use the native setDirectionality('rtl') in mPdf lib
is it possible?
thanks

For sheets it should indeed be $sheet->setRightToLeft(true).
I don't know if this also applies to pdf's. I have not really an idea how PHPExcel handles this, maybe the sheet setting for RTL doesn't get copied to the mPDF.

I can't find any reference to RTL in PHPExcel's wrapper for mPDF. So it's more likely be an issue you will to open over at their github.

Hi guys.
i use bellow code for dowload excel file but i need change $sheet direction to rtl with $sheet->setRightToLeft(true)
return Excel::download(new EqExport($usernames), 'FileName-'.Verta()->format('Y-m-d').'.xlsx');

how can i do it? :(

https://docs.laravel-excel.com/3.1/exports/extending.html#rtl-right-to-left-sheets

@dibakalantari sadly it doesnt work, @patrickbrouwers any insides on why ? or how to debug ?

pls use below code in your export file.
public function registerEvents(): array
{
return [
AfterSheet::class    => function(AfterSheet $event) {
$event->sheet->getDelegate()->setRightToLeft(true);
},
];
}

@msadeghyan1996 thanx but as stated previously, it doesnt work.
maybe because of the setup i have which use WithMapping, WithHeadings, FromCollection but am not sure, maybe @patrickbrouwers can help with that ?

i set below config in export file. maybe this is it. maybe.
use Maatwebsite\Excel\Concerns\WithEvents;
use Maatwebsite\Excel\Events\BeforeExport;
use Maatwebsite\Excel\Events\AfterSheet;