amplify で「export default awsmobile; ^^^^^^  SyntaxError: Unexpected token 'export'」と言われたときの対処法

`amplify publl` や `amplify push`, `amplify init` を実行した際に下記のエラーが発生。

```bash
root@81fc63b5a081:/usr/src/app# amplify init
Note: It is recommended to run this command from the root of your app directory
? Do you want to use an existing environment? Yes
? Choose the environment you would like to use: dev
Using default provider  awscloudformation
⠇ Building resource api/gaiis✅ GraphQL schema compiled successfully.

Edit your schema at /usr/src/app/amplify/backend/api/gaiis/schema.graphql or place .graphql files in a directory at /usr/src/app/amplify/backend/api/gaiis/schema
✔ Initialized provider successfully.
✖ There was an error initializing your environment.
/usr/src/app/src/aws-exports.js:34
export default awsmobile;
^^^^^^

SyntaxError: Unexpected token 'export'
    at wrapSafe (internal/modules/cjs/loader.js:1001:16)
    at Module._compile (internal/modules/cjs/loader.js:1049:27)
    at Module._compile (pkg/prelude/bootstrap.js:1758:32)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at Module.require (pkg/prelude/bootstrap.js:1719:31)
    at require (internal/modules/cjs/helpers.js:93:18)
    at getCurrentAWSExports (/snapshot/repo/build/node_modules/amplify-frontend-javascript/lib/frontend-config-creator.js:296:18)
    at getAWSExports (/snapshot/repo/build/node_modules/amplify-frontend-javascript/lib/frontend-config-creator.js:153:35)
    at createAWSExports (/snapshot/repo/build/node_modules/amplify-frontend-javascript/lib/frontend-config-creator.js:145:31)
    at Object.createFrontendConfigs (/snapshot/repo/build/node_modules/amplify-frontend-javascript/index.js:47:16)
    at AmplifyToolkit.onCategoryOutputsChange [as _onCategoryOutputsChange] (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/extensions/amplify-helpers/on-category-outputs-change.js:44:37)
    at initializeEnv (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/initialize-env.js:83:31)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async onSuccess (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/init-steps/s9-onSuccess.js:88:5)
    at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/commands/init.js:30:13)
    at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:292:9)
    at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:142:5)
    at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:40:9)
    at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:165:13)
```

# 対処法
自分の場合は以下で解決。
`aws-export.js` を `aws-export.ts` に変更する。


[補足]
他のgithubissueを読むと、`package.json` に `"type":"module"` を追加すると直るみたいなコメントもあったが、自分はそれでは解決しなかった。


# 参考
https://stackoverflow.com/questions/66046539/can-i-have-any-way-to-import-module-about-aws-export-js