fix(deps): update imports to use @lydell/node-pty directly
The previous commit (e1aee6a) updated package.json to use @lydell/node-pty
but the source files still imported from 'node-pty'. This caused the app
to fail on startup with "Cannot find module 'node-pty'" error.
This commit updates all imports and the vite external config to reference
@lydell/node-pty directly, completing the migration.
Files changed:
- src/main/terminal/pty-manager.ts
- src/main/terminal/pty-daemon.ts
- src/main/terminal/types.ts
- electron.vite.config.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ export default defineConfig({
|
||||
index: resolve(__dirname, 'src/main/index.ts')
|
||||
},
|
||||
// Only node-pty needs to be external (native module rebuilt by electron-builder)
|
||||
external: ['node-pty']
|
||||
external: ['@lydell/node-pty']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
import * as net from 'net';
|
||||
import * as fs from 'fs';
|
||||
import * as pty from 'node-pty';
|
||||
import * as pty from '@lydell/node-pty';
|
||||
|
||||
const SOCKET_PATH =
|
||||
process.platform === 'win32'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Handles low-level PTY process creation and lifecycle
|
||||
*/
|
||||
|
||||
import * as pty from 'node-pty';
|
||||
import * as pty from '@lydell/node-pty';
|
||||
import * as os from 'os';
|
||||
import type { TerminalProcess, WindowGetter } from './types';
|
||||
import { IPC_CHANNELS } from '../../shared/constants';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type * as pty from 'node-pty';
|
||||
import type * as pty from '@lydell/node-pty';
|
||||
import type { BrowserWindow } from 'electron';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user