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.

rhino3dm.js incompatible with Node v18. I keep getting error ERR_INVALID_URL

See original GitHub issue

I was getting this issue with 0.14.0. After upgrading to 7.15.0 I keep getting the same error.

TypeError: Failed to parse URL from {project path}/node_modules/rhino3dm/rhino3dm.wasm
    at Object.fetch (node:internal/deps/undici/undici:11118:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
      at new NodeError (node:internal/errors:393:5)
      at URL.onParseError (node:internal/url:565:9)
      at new URL (node:internal/url:645:5)
      at new Request (node:internal/deps/undici/undici:9472:25)
      at Agent.fetch2 (node:internal/deps/undici/undici:10291:25)
      at Object.fetch (node:internal/deps/undici/undici:11116:28)
      at fetch (node:internal/process/pre_execution:216:25)
      at instantiateAsync ({project path}/node_modules/rhino3dm/rhino3dm.js:9:16039)
      at createWasm ({project path}/node_modules/rhino3dm/rhino3dm.js:9:16646)
      at {project path}/node_modules/rhino3dm/rhino3dm.js:9:131229 {
    input: '{project path}/node_modules/rhino3dm/rhino3dm.wasm',
    code: 'ERR_INVALID_URL'
  }
}

I’m not sure what’s going on, because the file at {project path}/node_modules/rhino3dm/rhino3dm.wasm is there. I can do cat {project path}/node_modules/rhino3dm/rhino3dm.wasm and see a bunch of binary output.

I think I might have updated node to v18.12.1 before I started seeing this issue. Could this be a node 18 compatibility issue?

I do get this warning when starting the server:

(node:71881) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fraguadacommented, Apr 30, 2023

answered in #521

1reaction
dgrcodecommented, Mar 14, 2023

Thanks for the heads up! I just upgraded to 8.0.0 and it’s working great using node v18

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is the sample provided for Node in the rhino3dm.js working?
I get this after rhino3dm = require('rhino3dm')() TypeError: fetch failed at Object.
Read more >
Error deploying Node app on render.com: "The engine ' ...
This should resolve the "The engine 'node' is incompatible with this module" error you're experiencing.
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