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

Problem with node v18 #64

Open
slashinfty opened this issue Jul 16, 2022 · 0 comments
Open

Problem with node v18 #64

slashinfty opened this issue Jul 16, 2022 · 0 comments

Comments

@slashinfty
Copy link

With the introduction of native fetch, I think some things have changed. I used to have a working app (months ago), but now it won't work. I mostly followed the node_direct example, though I had to change

const wasmPath = require("path").join(__dirname, "node_modules/stockfish/src/stockfish.wasm");

to

const wasmPath = require('url').pathToFileURL(require("path").join(__dirname, "node_modules/stockfish/src/stockfish.wasm"));

since this line was requiring a URL (this is where native fetch in node has altered things I believe, as this condition should only be true in a browser?).

However, I get the following error:

TypeError: S.startsWith is not a function
    at Va

and it references this line.

Any thoughts on how to proceed?

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

2 participants
@slashinfty and others