non-context-aware native module
@deepak1556 已经在做这个了。
开始于 2025年12月19日。
评估
这个 Issue 还没有评估数据。
描述
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.
- 主要语言
- TypeScript
- 星标
- 2k
- 派生
- 337
- 平均合并
- 21 小时 58 分钟
- 30 天内合并 PR
- 3
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/node-pty 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 76/100
查看 microsoft/node-pty 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/claude-code#96687 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·