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

TypeError: Failed to parse URL from occt-import-js.wasm #10

Closed
trusktr opened this issue Sep 18, 2022 · 1 comment
Closed

TypeError: Failed to parse URL from occt-import-js.wasm #10

trusktr opened this issue Sep 18, 2022 · 1 comment

Comments

@trusktr
Copy link

trusktr commented Sep 18, 2022

Hello! I just tried the basic example in the README, and it ends with an error:

 node step-to-three.cjs                                                                                                                                                    
(node:57884) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
/Users/trusktr/src/Hakkei-Co+meteor-app/node_modules/occt-import-js/dist/occt-import-js.js:9
....

TypeError: Failed to parse URL from /Users/trusktr/src/Hakkei-Co+meteor-app/node_modules/occt-import-js/dist/occt-import-js.wasm
    at new Request (node:internal/deps/undici/undici:5491:19)
    at Agent.fetch2 (node:internal/deps/undici/undici:6288:25)
    ... 4 lines matching cause stack trace ...
    at /Users/trusktr/src/Hakkei-Co+meteor-app/node_modules/occt-import-js/dist/occt-import-js.js:9:116855
    at Object.<anonymous> (/Users/trusktr/src/Hakkei-Co+meteor-app/step-to-three.cjs:2:47)
    at Module._compile (node:internal/modules/cjs/loader:1119:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10) {
  [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
      at new NodeError (node:internal/errors:393:5)
      at URL.onParseError (node:internal/url:564:9)
      at new URL (node:internal/url:644:5)
      at new Request (node:internal/deps/undici/undici:5489:25)
      at Agent.fetch2 (node:internal/deps/undici/undici:6288:25)
      at Object.fetch (node:internal/deps/undici/undici:7125:20)
      at fetch (node:internal/process/pre_execution:214:25)
      at instantiateAsync (/Users/trusktr/src/Hakkei-Co+meteor-app/node_modules/occt-import-js/dist/occt-import-js.js:9:12578)
      at createWasm (/Users/trusktr/src/Hakkei-Co+meteor-app/node_modules/occt-import-js/dist/occt-import-js.js:9:13188)
      at /Users/trusktr/src/Hakkei-Co+meteor-app/node_modules/occt-import-js/dist/occt-import-js.js:9:116855 {
    input: '/Users/trusktr/src/Hakkei-Co+meteor-app/node_modules/occt-import-js/dist/occt-import-js.wasm',
    code: 'ERR_INVALID_URL'
  }
}

Node.js v18.8.0

Do I need to run it a certain way?

@trusktr
Copy link
Author

trusktr commented Sep 18, 2022

I downgraded from Node 18 to Node 17 as hinted over at GoogleChromeLabs/squoosh#1260 and the issue went away.

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