-
Notifications
You must be signed in to change notification settings - Fork 202
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
ERROR ReferenceError: regeneratorRuntime is not defined #545
Comments
I'm having this same issue with contentful, please any fix????? |
As a quick fix add the following two lines at the top of the app.component.ts file, you don't get an error anymore
|
Any update on this? |
I am continuing to experience this issue as well.
|
Rolling back to 7.15.2 solves this as well. Is it a more general issue? I'm able to reproduce this with a simple js file and webpack (see: https://github.com/rustyy/contentful-issue-545). Or am I missing something? |
You can find out more about how to migrate from version 7.x.x here. It touches on how to setup Regenerator Runtime for the browser. |
I'm running into 2 issue on migration from contentful 7.15.2 to 8.x.x:
Current environment:
We are trying to move away from 7.15.2 because of axios vulnerabilities: |
Hello, I made a new PR addressing this problem. Once it's approved, I'll post an update here |
@marcolink thank you! Could you please clarify if your PR should also fix server side calls? I have bundled up client side and server side issues together but the more I think about those the more I'm questioning if those are related |
Hi @VirMaker, The PR addresses all issues related to bundling the library (especially the I wonder what changed from Changeset |
@marcolink, not sure. When using 8.0.0 I see regenerator-runtime error on the server and the client. With 8.0.1+ I no longer see this (or any other) errors on the server, only client, but server side contentful requests no longer complete before page is flushed to the client |
A new version has been released https://github.com/contentful/contentful.js/releases/tag/v8.1.8 This version only expects the regeneratorRuntime for the legacy browser bundle. I'll close the Issue for now. Please feel free to open it again if you detect any related issues. |
@marcolink, thank you. Issue #1 (client side) is resolved, but I still experience issue #2 (server side): |
Expected Behavior
Expect Contentful SDK in Angular 11 project to work against sample space.
Actual Behavior
Browser throws error:
core.js:5967 ERROR ReferenceError: regeneratorRuntime is not defined
at Object._getEntries (create-contentful-api.js:393)
at Object.getEntries (create-contentful-api.js:371)
at AppComponent.ngOnInit (app.component.ts:26)
at callHook (core.js:2486)
at callHooks (core.js:2456)
at executeInitAndCheckHooks (core.js:2408)
at refreshView (core.js:9194)
at renderComponentOrTemplate (core.js:9293)
at tickRootContext (core.js:10519)
at detectChangesInRootView (core.js:10544)
Possible Solution
Regarding #496, seems is not fixed.
Steps to Reproduce
package.json
app.component.ts
Context
Angular SPA to use Contentful delivery/preview.
Environment
Angular CLI: 11.0.5
Node: 14.8.0
OS: darwin x64
Angular: 11.0.5
Ivy Workspace: Yes
@angular-devkit/architect 0.1100.5
@angular-devkit/build-angular 0.1100.5
@angular-devkit/core 11.0.5
@angular-devkit/schematics 11.0.5
@schematics/angular 11.0.5
@schematics/update 0.1100.5
rxjs 6.6.3
typescript 4.0.5
Chrome Version 87.0.4280.88 (Official Build) (x86_64)
Edge Version 88.0.705.29 (Official build) Beta (64-bit)
Safari Version 13.1.2 (13609.3.5.1.5)
The text was updated successfully, but these errors were encountered: