Open alexgleason opened 2 months ago
I'm not sure if that's the solution, or if we want to make it use the deno executable there. It would improve compatibility.
Yeah this should use the deno executable. We actually do this already, it just currently falls back to node if there are flags specified. (In other words, node postinstall.js
already works and runs Deno). We just need to handle the -e
/ —eval
flag.
It’s straightforward, the only complication is that we should wrap the eval-ed code to inject a require
function (and potentially node globals, though they aren’t strictly required in this particular case).
Version: Deno 1.45.5
I am trying to make vitepress (with a package.json) build with Deno using:
It results in this error:
The problem is that
node
is used as an executable inside of the postinstall script of the package:I submitted an MR to vue-demi to skip the postinstall script if node is not found, because it not essential: https://github.com/vueuse/vue-demi/pull/266
I'm not sure if that's the solution, or if we want to make it use the
deno
executable there. It would improve compatibility.I was also able to work around it by using
--allow-scripts=npm:esbuild
to whitelist the only other package with a postinstall script, but it would be frustrating if there was a lot of other packages and no way to blacklist