Can't reexport the named export 'BREAK' from non EcmaScript module (only default export is available) when including aws-amplify - lack of mjs file support
See original GitHub issueCurrent behavior:
Have just upgraded to version 5.0.0 and it looks like there is a webpack config issue, missing *.mjs support, which is causing the @aws-amplify and graphql libraries from compiling. This worked in 4.12.1
aws-amplify/amplify-js#4299 graphql/graphql-js#1272
Error: Webpack Compilation Error
./node_modules/graphql/index.mjs 49:0-53:205
Can't reexport the named export 'BREAK' from non EcmaScript module (only default export is available)
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/AWSAppSyncRealTimeProvider.js
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/index.js
@ ./node_modules/@aws-amplify/pubsub/lib-esm/index.js
@ ./node_modules/aws-amplify/lib-esm/index.js
@ ./cypress/support/custom/userLogin.ts
@ ./cypress/support/custom/index.ts
@ ./cypress/support/commands.ts
@ ./cypress/support/index.ts
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
aws-amplify | Can't reexport the named export 'package_name ...
After doing some research on the issue, I found a solution that recommended to add the '. mjs' extension to the webpack. js...
Read more >GraphQL Errors: Can't reexport the named export 'BREAK ...
GraphQL Errors: Can't reexport the named export 'BREAK' from non EcmaScript module (only default export is available).
Read more >Changelog - esbuild - Breword 文档集合
The CSS bundler built in to esbuild is only designed with real CSS in mind. ... If the file "y" is in ESM...
Read more >Changelog | Meteor API Docs
ECMAScript module syntax ( import , export , and dynamic import() ) is now supported by default everywhere, including in modules imported from...
Read more >Export Amplify backends to CDK and use with existing ... - AWS
Today, AWS Amplify announces the ability to export Amplify CLI-generated backends as a Cloud Development Kit (CDK) stack and incorporate ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jennifer-shehane I have a custom function to login to the AWS Cognito service, which uses the aws-amplify library.
Aws-amplify relies on graphql queries, whose library ‘very kindly’ uses .mjs files.
I get the error when launching the test. It fails during the loading of the test
I can recreate the error when including aws-amplify:
Repro
cypress/support/index.js
package.json
4.12.1
The
aws-amplify
takes a really long time to load normally. see https://github.com/cypress-io/cypress/issues/74645.0.0