-
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
Expected identifier but found "=", unable to publish app #11455
Comments
Was unable to recreate this in another project, closing. I believe the step I had missed was adding the amplify npm modules with
|
Reopening- this is happening after adding authentication and the database backend. I don't have these issues when just creating the default angular app. |
hi @joshuaMarple |
@sparteek91 and @joshuaMarple, can you both check to see if there is another dependency besides After looking through the angular-cli repo for similar errors, there might be a couple ways we can try to resolve this. Can one of you try deleting your |
Thanks, it solved the issue |
Can also confirm that deleting |
I got the same Optimization Error a week ago and had spent a few days narrowing down the culprits. It is from a change in @aws-amplify/predictions > 5.1.6 . which I don't reference in my Angular 15 code, but is part of the @aws-amplify/ui-angular You can bypass the problem with the followin in your package.json, until the underlying problem is fixed ( see pull request #11453 ) "overrides":{ |
Here's a repro repo: https://github.com/wlee221/angular-amplify-bug. I could confirm that rollbacking |
Yes, we also got the same issue we are using |
Affirmative. Staying with "5.2.1" works.. but I researched further to find the underlying culprit. per above. by inserting the following into package.json:
nadetastic and wlee221 reacted with thumb |
@gerrytsui thank you for sharing that. I am using aws-amplify for only authentication so, is there a way that I can only use aws-amplify/auth library rather getting all the dependencies coming with aws-amplify. |
@sandeep-bhaskar , if you need the ui components ( e.g. the Authenticator UI), the ui-angular has aws-amplify as a dependency, so answer is No. We rely on webpack treeshaking, so it is a moot point. e.g. we don't use Predictions, but it is causing the ng build optimization error. |
@gerrytsui we don't need the ui components, we are using our own custom components. But, we are using federated logins and cognito. |
Updating this issue to be a |
The proposed fix has been released to npm and testing confirms that the build issue is unreproducible in the example app provided above. Thank you all for your input on this issue. |
Thanks for merging and release to npm. I, too, am confirming our (huge) production app can build without the Optimization error. |
Before opening, please confirm:
JavaScript Framework
Angular
Amplify APIs
Authentication, GraphQL API
Amplify Categories
auth, storage, hosting
Environment information
Describe the bug
I am seeing the bug as described in #10268.
I have double checked that all of the polyfill settings are being set as defined in https://docs.amplify.aws/start/getting-started/setup/q/integration/angular/.
I can recreate this with just running
ng build
.The error goes away if I turn off all optimizations.
The exact error is
Expected behavior
I expect the tutorial app to be published
Reproduction steps
I followed exactly the steps in the tutorial.
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: