I am developing a simple Desktop app where I need to embed an interactive terminal like Terminal
in VSCode. But I get the following errors constantly, while the node.pty and all dependencies are installed. Additionally, Unable to load preload script: while the address to the preload.js script is correct.
- Node: v18.17.1
- ElectronJS: 27.0.3
- node-pty": "^1.0.0",
- "xterm": "^5.3.0"
- macOS Sonoma M2
innerError Error: Cannot find module '../build/Debug/pty.node'
Uncaught Error: Loading non-context-aware native module in renderer:
Unable to load preload script: /Users/user/folder/folder/folder/preload.js
I tried running it with npm start