Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find module '../build/Debug/pty.node' by electron-rebuild rebuild #1026

Open
Pulset opened this issue Aug 2, 2022 · 0 comments
Open

Comments

@Pulset
Copy link

Pulset commented Aug 2, 2022

Environment details
OS:Mac os
OS version:11.4
node-pty version:0.10.1
electron version: 19.0.9
node version: 16.16.0
electron-rebuild: 3.2.8

I rebuild node-pty by electron-rebuild package,it rebuilds successful.But when I run this project, I get some errors.

unixTerminal.ts:19 innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /Users/zcy/Desktop/project/github/electron-quick-start/node_modules/node-pty/lib/unixTerminal.js
- /Users/zcy/Desktop/project/github/electron-quick-start/node_modules/node-pty/lib/index.js
- /Users/zcy/Desktop/project/github/electron-quick-start/index.html
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at i._resolveFilename (node:electron/js2c/renderer_init:33:1095)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at i._load (node:electron/js2c/renderer_init:33:356)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (unixTerminal.ts:17:11)
    at Object.<anonymous> (unixTerminal.ts:300:2)
    at Module._compile (node:internal/modules/cjs/loader:1118:14)
(anonymous) @ unixTerminal.ts:19
unixTerminal.ts:21 Uncaught Error: dlopen(/Users/zcy/Desktop/project/github/electron-quick-start/node_modules/node-pty/build/Release/pty.node, 1): no suitable image found.  Did find:
	/Users/zcy/Desktop/project/github/electron-quick-start/node_modules/node-pty/build/Release/pty.node: mach-o, but wrong architecture
	/Users/zcy/Desktop/project/github/electron-quick-start/node_modules/node-pty/build/Release/pty.node: mach-o, but wrong architecture
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
    at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1812)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at i._load (node:electron/js2c/renderer_init:33:356)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (unixTerminal.ts:14:9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant