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

Use in CloudFlare Workers - error with "cannot read from undefiend (trying to read 'href') #4

Open
mitya33 opened this issue Jan 17, 2024 · 0 comments

Comments

@mitya33
Copy link

mitya33 commented Jan 17, 2024

This error suggests the package believes it's running in the browser when in fact it's running in Node (in my case, within CF Workers.)

This is when running the suggested demo code:

const { duktapeEval, quickjsEval } = require('wasm-jseval')
duktapeEval.getInstance().then(mod => {
    console.log(mod.eval('1+1')) // 2
    const add = mod.newFunction(['a', 'b'], 'return a+b')
    console.log(add(1, 2)) // 3
})

Any thoughts here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant