-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Cannot get aws-sdk working with Angular universal #1944
Comments
Hi @achelkia |
Thanks for the answer.
the tsconfig.app.json:
and the tsconfig.server.json:
I already tried moving |
I see you did not install |
Oh sorry about that :
We do have |
Hi @AllanFly120, thanks for the answer. |
Hi, just upgraded to angular 6 yesterday and I having the same issue when trying to upload an object to S3. Browsing for answer I got to a post, which somehow I managed to lose, that gave me some ideas. The issue seems to be the SDK is not recognising it is running in a browser. I just edited, for testing purpose only,
instead
and I have my application running again. I assume something changed in the guts of angular or nodes, in my case running v6.0.3 and v8.11.3 respectively, which makes aws-sdk to behave differently. |
Adding |
Angular 6, ERROR in node_modules/aws-sdk/clients/acm.d.ts(133,37): error TS2304: Cannot find name 'Buffer' So as suggested in this post: Project Compiled successfully. But then it did open on browser. Uncaught ReferenceError: global is not defined So as suggested in other issue on https://github.com/aws-amplify/amplify-js/issues/678
got my app working |
In my case. I used global types and "types":["node"] inside tsconfig.app.json was overwriting "typeRoots" value inside tsconfig json. So the solution is as follows:
|
This worked for me on IONIC 4.5.0 & Angular 7.1.3. Alternatively you can remove types from the same location. |
We are also facing the same issue while building the library in angular7. { tsconfig.app.json tsconfig.json { Facing build error BUILD ERROR |
It worked for me,. I missed to install @types/node and added "node" to the types field in tsconfig |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Hi,
We use aws-sdk with an Angular 5 application. Until now everything worked great.
We are trying to add server side rendering using angular-universal. When trying to build the server application, like this : https://github.com/angular/angular-cli/wiki/stories-universal-rendering#building-the-bundle , we get these errors :
Please note that the client application still builds ok.
Thanks for your help.
The text was updated successfully, but these errors were encountered: