Skip to content
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

can't convert undefined to object #909

Open
reklast opened this issue Oct 22, 2021 · 5 comments
Open

can't convert undefined to object #909

reklast opened this issue Oct 22, 2021 · 5 comments
Labels
bug important Requires inmediate attention

Comments

@reklast
Copy link

reklast commented Oct 22, 2021

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;
@reklast reklast added the bug label Oct 22, 2021
@btzr-io
Copy link
Owner

btzr-io commented Oct 22, 2021

I think you need to use the full url for workerUrl

Example: http://localhost:3000/worker-bundle.js

See: #739 (comment)

@reklast
Copy link
Author

reklast commented 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.

@btzr-io
Copy link
Owner

btzr-io commented Oct 23, 2021

Can you provide a reproducible example ?
https://codesandbox.io/ or a github repository

@reklast
Copy link
Author

reklast commented Oct 23, 2021

I have a feeling that solution is pretty obvious.
https://codesandbox.io/s/falling-surf-9ur1h?file=/src/App.js

@btzr-io btzr-io pinned this issue Mar 1, 2022
@btzr-io btzr-io unpinned this issue Aug 13, 2022
@btzr-io
Copy link
Owner

btzr-io commented Aug 19, 2022

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

@btzr-io btzr-io added the important Requires inmediate attention label Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug important Requires inmediate attention
Projects
None yet
Development

No branches or pull requests

2 participants