non-context-aware native module
@deepak1556 is already working on this.
Since Dec 19, 2025.
Assessment
This issue has not been assessed yet.
Description
Environment details
- OS: Arch Linux
- OS version: Linux 5.6.7-zen1-1-zen
- node-pty version: 0.9.0
- electron version: 8.2.3
Issue description
I'm trying to use node-pty in my electron app. But if I try yo import it using:
let pty;
try {
pty = require('node-pty');
} catch (outerError) {
console.error('outerError', outerError);
}
I get the following error:
webpack-internal:///ou8/:33 outerError Error: Cannot open /.../node_modules/node-pty/build/Release/pty.node: Error: Loading non-context-aware native module in renderer: '/.../node_modules/node-pty/build/Release/pty.node', but app.allowRendererProcessReuse is true. See https://github.com/electron/electron/issues/18397.
at Object.eval (webpack-internal:////2OH:1)
at eval (webpack-internal:////2OH:2)
at Object./2OH (npm.node-pty.js:11)
at __webpack_require__ (runtime.js:854)
at fn (runtime.js:151)
at eval (webpack-internal:///NEGr:26)
at Object.NEGr (npm.node-pty.js:37)
at __webpack_require__ (runtime.js:854)
at fn (runtime.js:151)
at eval (webpack-internal:///ubDT:13)
I know I could just set app.allowRendererProcessReuse = false;, but in consideration of newer electron versions I don't want to do this.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 337
- Avg merge
- 21h 58m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/node-pty
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/node-pty
Similar issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100