question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught ReferenceError: regeneratorRuntime is not defined

See original GitHub issue

Expected Behavior

Jimp browser version should load

Current Behavior

Jimp fails to load in browser

Failure Information (for bugs)

index.js?c2d7:3 Uncaught ReferenceError: regeneratorRuntime is not defined

Steps to Reproduce

import Jimp from "jimp/es"

Screenshots NA

Context

Browser, trying to use jimp in @vue-cli project

  • Jimp Version:0.8.2
  • Operating System: Windows 10
  • Node version: 12.10.0

Failure Logs

Uncaught ReferenceError: regeneratorRuntime is not defined
    at eval (index.js?c2d7:3)
    at Module../node_modules/@jimp/utils/es/index.js (app.js:1259)
    at __webpack_require__ (app.js:727)
    at fn (app.js:101)
    at Module.eval (index.js?67ea:1)
    at eval (index.js:1303)
    at Module../node_modules/@jimp/core/es/index.js (app.js:855)
    at __webpack_require__ (app.js:727)
    at fn (app.js:101)
    at eval (index.js?0383:1)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:28 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
ChrisHSandNcommented, Dec 3, 2019

For anyone finding this in future and still having the issue:

I am also still experiencing this in an electon project with Jimp 0.9.3 (but only when I package the app with electron-builder).


Things I tried from above which didn’t work:

# tsconfig.json
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
# package.json
"@babel/runtime": "^7.7.2",
# index.ts
require("@babel/runtime/regenerator");
import * as Jimp from 'jimp/es';

The only thing I have found which did work:

# package.json
# swap "jimp" to:
"jimp-compact": "^0.9.3"
# index.ts
import * as Jimp from 'jimp-compact';

I know that it is a semi-unofficial fork, but however jimp-compact dependency works vs jimp seems to fix the error…

2reactions
crutchcorncommented, Nov 19, 2019

@divinealpine are you able to test again but against 0.8.6-canary.815.502.0?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix regeneratorRuntime is not defined?
I have ran into a problem, the error is regeneratorRuntime is not defined while working with React and Parcel bundler.
Read more >
Babel 6 regeneratorRuntime is not defined - Stack Overflow
I did not need babel-runtime to get async await working. Is that correct? Edit: I'm running the code server side. :) – GijsjanB....
Read more >
ReferenceError regeneratorRuntime is not defined · Issue #9849
I'm building an SSR template, and when I use @babebl/register and then execute webpack (config), the system reported an error.
Read more >
Parcel, how to fix the `regeneratorRuntime is not defined` error
I run into this problem in a project using Babel as soon as I added an async function, but the problem is the...
Read more >
Blank Admin Page: regeneratorRuntime is not defined (babel?)
Uncaught ReferenceError : regeneratorRuntime is not defined ... Still experiencing the issue while deploying with Heroku, no idea how to fix ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found