node-pty
node-pty copied to clipboard
Wrong Node Module Version
Environment details
- OS: Ubuntu
- OS version: 22.04
- node-pty version: 1.0.0
Issue description
After installing node-pty, i tried to spawn a command and this error triggered.
As proposed i tried npm rebuild and npm install but with no success
+1
Same problem on Windows 11 (23H2) with the same node-pty version:
(node:31732) UnhandledPromiseRejectionWarning: Error: The module '\\?\D:\Projects\Apps\Temp\Test\test\node_modules\node-pty\build\Release\conpty.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 115. This version of Node.js requires
NODE_MODULE_VERSION 128. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Recompiling/reinstalling the module, or downgrading to various node and electron versions does not resolve the issue either. Is there any plan to address this?
This happens typically when you've installed/compiled node-pty using your local node's version and then try to run it in Electron. I'm not sure if this is still the right way to do it, but that's what this file does:
https://github.com/microsoft/node-pty/blob/main/examples/electron/npm_install.sh
Please consult Electron or your platform's docs on this.