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.

can't convert undefined to object

See original GitHub issue

An error occurs when I’m trying to run the script

Both worker-bundle.js and archive are in a public folder, but for some reason I’m getting this error:

image

Has anyone encountered this problem before? How to fix it?

My code:

import React from "react";
import Villain from 'villain-react';

import 'villain-react/dist/style.css';

function App() {
  const url = 'example.zip';

  const workerUrl = 'worker-bundle.js';

  return <Villain 
            workerUrl={workerUrl}
            source={url}  
          />
}

export default App;

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
reklastcommented, Oct 23, 2021

Unfortunately it doesn’t help. I’ve been trying to fix this for a few hours already, but can’t find where the problem is coming from. The error above is the only one i get, i don’t have any errors related to worker-bundle file or archive itself. Maybe there is a conflict in my dependencies, I’m not really sure.

0reactions
btzr-iocommented, Aug 19, 2022

This issue was resolved on the new version. I’ll try to publish the new vesion in a few days / weeks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript TypeError: can't convert undefined to object
The error is because you did not define horizont as an Array. You are using a comma to separate your variable so it...
Read more >
Cannot convert undefined or null to Object in JavaScript
The "Cannot convert undefined or null to Object" error occurs when we pass a null or an undefined value to a function that...
Read more >
Cannot convert undefined or null to object when using ...
When creating component from example in React app, app throws runtime error TypeError: Cannot convert undefined or null to object .
Read more >
getDayNames TypeError: "can't convert undefined to object"
Hello,. I've been having trouble integrating your schedule component into my app. Whenever I try to use it in my app, it generates...
Read more >
Cannot convert undefined or null to object - YouTube
JavaScript : How to resolve TypeError: Cannot convert undefined or null to object [ Gift : Animated Search Engine ...
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