title: ReferenceError: globalThis is not defined
body: <p>I have installed the npm module aws-amplify/cli globally by using the following code:</p>
  <pre><code>npm install -g @aws-amplify/cli
  </code></pre>
  <p>This worked, but when trying to initialise my environment using the amplify cli, it gives me the following error:</p>
  <pre><code>/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/queue-microtask/index.js:1
  ReferenceError: globalThis is not defined
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/queue-microtask/index.js:5:25)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/run-parallel/index.js:4:24)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@nodelib/fs.scandir/out/providers/async.js:5:13)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@nodelib/fs.scandir/out/index.js:4:15)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@nodelib/fs.walk/out/readers/async.js:4:19)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@nodelib/fs.walk/out/providers/async.js:3:17)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@nodelib/fs.walk/out/index.js:4:17)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fast-glob/out/readers/stream.js:5:16)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fast-glob/out/providers/async.js:3:18)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fast-glob/out/index.js:3:17)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/globby/index.js:5:18)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/lib/provider-utils/awscloudformation/utils/packageLayer.js:21:34)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/lib/provider-utils/awscloudformation/utils/layerParams.js:13:24)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/lib/provider-utils/awscloudformation/index.js:7:23)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/lib/index.js:13:29)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/@aws-amplify/cli/lib/extensions/amplify-helpers/update-amplify-meta.js:34:37)
      at Generator.next (&lt;anonymous&gt;)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
      at AmplifyToolkit.get updateamplifyMetaAfterResourceAdd [as updateamplifyMetaAfterResourceAdd] (/usr/local/lib/node_modules/@aws-amplify/cli/lib/domain/amplify-toolkit.js:229:17)
      at /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/lib/provider-utils/awscloudformation/utils/amplify-meta-updaters.js:48:21
      at processTicksAndRejections (internal/process/next_tick.js:81:5)
  </code></pre>
  <p>How can I fix this?</p>