-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQL "only one instance" error when using minified aws-amplify.min.js #820
Comments
Hi @jrasky we will have a new release very soon. That fix that problem if you use the published version. If you build this repo master branch you will have the fixed version. The steps after cloning the repo are this.
You can check dist files for aws-amplify on |
Going to close this as this should be fixed with the latest release. Please reopen if you are still experiencing this issue. |
@jordanranz this is still happening for me. I'm using |
Am also experiencing this issue. No issues when running From my
|
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
When including the minified build of aws-amplify from a CDN such as unpkg, graphql fails to load correctly.
index.html
:In particular, this is because
graphql
requiresprocess.env.NODE_ENV="production"
for minified builds. See graphql/graphql-js#1182, graphql/graphql-js#1174. In particular, aws-amplify does not take the recommended step in https://webpack.js.org/guides/production/#specify-the-environment:https://github.com/aws/aws-amplify/blob/2bee05e427bea0b166a7bc787b50a2b4da54f79d/packages/aws-amplify/webpack.config.js#L22-L31
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than AWS Amplify.
What is the expected behavior?
aws-amplify loads correctly, as it does when using the non-minified version.
Which versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?
Chrome and Windows 10, although presumably this affects all browsers/OSs
You can turn on the debug mode to provide more info for us by setting
window.LOG_LEVEL = 'DEBUG';
in your app.The text was updated successfully, but these errors were encountered: