Closed bartbutenaers closed 3 years ago
Can you try a newer version of Node.js? node-pty
requires v10 or later.
What's your cpu architecture?
uname -a
pi@PortableAsus:~/.node-red$ uname -a Linux PortableAsus 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
Might this be perhaps some issue: I run Ubuntu in Windows 10 (like you can see here).
I have upgraded NodeJs to version v10.17.0 (recommended version for Node-RED), but then the problem still occurs:
18 Nov 13:53:50 - [info] Node-RED version: v1.0.1 18 Nov 13:53:50 - [info] Node.js version: v10.17.0 18 Nov 13:53:50 - [info] Linux 4.4.0-18362-Microsoft x64 LE 18 Nov 13:53:50 - [info] Loading palette nodes innerError { Error: Cannot find module '../build/Debug/pty.node' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.
(/home/pi/.node-red/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js:30:15) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND' } 18 Nov 13:54:14 - [info] Worldmap version 2.1.3 18 Nov 13:54:16 - [info] Dashboard version 2.17.0 started at /ui 18 Nov 13:54:16 - [warn] ------------------------------------------------------ 18 Nov 13:54:16 - [warn] [node-red-contrib-xterm/xterm_shell] Error: Cannot find module '../build/Release/pty.node' 18 Nov 13:54:16 - [warn] ------------------------------------------------------ 18 Nov 13:54:16 - [info] Settings file : /home/pi/.node-red/settings.js
@bartbutenaers After you updated your node version, did you delete your node_modules
directory and reinstall your modules?
This is highly recommended after any node version change, as certain modules (including this one) can be sensitive to version changes.
It is throwing the same error. Here I've using it for an atom package called atomforces . It was using node-pty initially but was rather chosen to be replaced with node-pty-prebuilt-multiarch due to performance issues on windows. But now after switching it works on windows but throws an error on ubuntu.
Here is the error:
Atom: 1.58.0 x64 Electron: 9.4.4 Node: 10.19.0 OS: Ubuntu 20.04.3 (Linux blue 5.11.0-41-generic #45~20.04.1-Ubuntu SMP Wed Nov 10 10:20:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux) Thrown From: atomforces package 0.4.1
Environment details
Issue description
Dear, Thanks for sharing this VERY useful node!!! I have used it on my Windows 10 portable, and there it was running very smooth, but not on ubuntu.
In the package.json file of my custom node, I have added following dependencies:
I use this dependency in the Javascript code of my (NodeJs) node:
When I install my node (directly from my Github repository), I can see that a build is initiated:
It is not clear to my why it is looking for a 'Debug' directory, while the build only created a 'Release' directory. And the error message (that Node-RED catches) seems to be referring to the 'Release' folder.
Do you have any idea what I could be doing wrong?
Thanks in advance!! Bart Butenaers