You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I call prism in the Node.js CLI, but Node.js v18 does not have wasi.getImportObject(), so I get an error.
(node:1048) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
file:///Users/mh4gf/ghq/github.com/MH4GF/debug-prism-js/node_modules/@ruby/prism/src/index.js:20
const instance = await WebAssembly.instantiate(wasm, wasi.getImportObject());
^
TypeError: wasi.getImportObject is not a function
at loadPrism (file:///Users/mh4gf/ghq/github.com/MH4GF/debug-prism-js/node_modules/@ruby/prism/src/index.js:20:61)
at async file:///Users/mh4gf/ghq/github.com/MH4GF/debug-prism-js/index.js:3:15
Node.js v18.20.5
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, maintainers.
We are building a tool to parse database schemas and automatically generate ER diagrams, and we are using Prism to parse schema.rb in Ruby on Rails.
https://github.com/liam-hq/liam/tree/main/frontend/packages/db-structure/src/parser/schemarb
I call prism in the Node.js CLI, but Node.js v18 does not have wasi.getImportObject(), so I get an error.
End of Life for Node.js v18.x is April 2025, but it makes sense to support v18 until then.
https://github.com/nodejs/release#release-schedule
I think this line could be rewritten as follows, what do you think?
prism/javascript/src/index.js
Line 20 in cdf702b
Thank you!!
Beta Was this translation helpful? Give feedback.
All reactions