-
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
"process is not defined" FIX causes "Cannot read property 'Stream' of undefined" #3274
Comments
The first error It was strange because even when I copied the exact same component ts code from another component, the error persisted. I deleted the component, re-created a new one and the error so far hasn't come back. |
The error |
I need to get this solved ASAP to move forward with app development, is anyone able to help? |
Again, I was able to delete the component, and re-create a new component. Copy and paste the same code, and the error didn't occur. I'm not sure what causes it, but re-creating the component is (an inconvenient) work-around for now. Then a couple of hours later, creating a brand new component, import the APIService and it's back. :( |
@EmanH - Are you using the aws-amplify-angular package and it's AmplifyService, or are you just using Amplify.JS alone with your own APIService? |
@haverchuck I believe I'm using Amplify.JS alone. |
Yeah this error just happened for me. I added the Amplify generated Angular API service to another service and I get exactly the same error |
Duplicate of #3193 I found a way to properly Polyfill the "process is not defined" npm install -S process the add the following to your polyfills.ts import * as process from 'process'; and set tsconfig.json "target": "es2015", |
@gerrytsui you sir... are a legend! fixed on my end now |
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 |
Describe the bug
Importing and adding my ApiService to a component constructor (angular) causes the following error:
I can fix this by adding the following to polyfills:
However, doing so causes the following error when authenticating:
I've narrowed it down to that. I can get rid of one error, by adding the polyfill, and get rid of the other error by removing the polyfill.
I've got no idea why the .process polyfill would be causing
Cannot read property 'Stream' of undefined
. Doesn't make any sense to me.This is breaking my application though, and I can't get around it.
There seems to be so many bugs with amplify. Sigh... it was a nice dream.
The text was updated successfully, but these errors were encountered: