Nassinger
Nassinger3d ago

Ngrok npm package error

I'm trying to run some code that uses the ngrok npm package, but I'm getting this error when I try to run it with Deno:
No description
3 Replies
Nassinger
Nassinger3d ago
import ngrok from 'npm:ngrok';

const ngrokUrl = await ngrok.connect({
authtoken: ...,
addr: 3000
});
import ngrok from 'npm:ngrok';

const ngrokUrl = await ngrok.connect({
authtoken: ...,
addr: 3000
});
Maybe I'm dumb? here are my arguments:
deno run -A --env-file=.env index.ts
deno run -A --env-file=.env index.ts
Nassinger
Nassinger3d ago
It looks like Deno is trying to run it as "ngrok.exe", but the file doesn't have an extension:
No description
Nassinger
Nassinger2d ago
I might be wrong, but I think Node.js on windows allows you to spawn an executable file using a path that doesn’t end with .exe maybe Deno should do the same to maintain compatibility :derp_seeing: even though this is something a bit strange Hmm, I tried adding the .exe extension, but now Deno gives me this new error:
- error: Uncaught Error: Failed to spawn 'C:\Users\Nassinger\AppData\Local\deno\npm\registry.npmjs.org\ngrok\5.0.0-beta.2\bin\ngrok.exe': This version of %1 is not compatible with the version of Windows being run. Check your computer's system information and contact the software vendor. (os error 216): This version of %1 is not compatible with the version of Windows being run. Check your computer's system information and contact the software vendor. (os error 216)
- error: Uncaught Error: Failed to spawn 'C:\Users\Nassinger\AppData\Local\deno\npm\registry.npmjs.org\ngrok\5.0.0-beta.2\bin\ngrok.exe': This version of %1 is not compatible with the version of Windows being run. Check your computer's system information and contact the software vendor. (os error 216): This version of %1 is not compatible with the version of Windows being run. Check your computer's system information and contact the software vendor. (os error 216)
now it looks like a ngrok problem? but maybe I'm wrong also, if anyone here knows of a free alternative that’s as easy to use as ngrok, I would be happy to hear about it hello?