Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ npm install # postinstall rebuilds node-pty for Electron
npm run dev
```

> **Windows: MSB8040 / “Spectre” error during `npm install`.** When built
> from source, `node-pty` links the MSVC Spectre-mitigated runtime
> libraries. If Visual Studio lacks the
> “MSVC v143 – C++ x64/x86 **Spectre-mitigated libs**” component,
> `electron-rebuild` fails with MSB8040. The project works around it
> automatically: `postinstall` flips `SpectreMitigation` to `false` in
> `node-pty/binding.gyp` and `deps/winpty/src/winpty.gyp` before the
> rebuild (see `scripts/fix-spectre.js`). To build manually instead,
> install that component via “Visual Studio Installer → Modify →
> Individual components”, or set
> `<SpectreMitigation>false</SpectreMitigation>` in the vcxproj.

Import media, edit, press Export. For the AI assistant press 🤖 (the
`claude` CLI must be installed and logged in). If your network needs a
proxy for Claude/npm, create `~/.config/kadr/claude-env.json`:
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,26 @@ npm install # postinstall пересоберёт node-pty под Electron
npm run dev
```

> **Windows: ошибка MSB8040 / «Spectre» при `npm install`.**
> `node-pty` при сборке из исходников требует библиотеки Spectre-митигации
> MSVC. Если в Visual Studio не установлен компонент
> «MSVC v143 – C++ x64/x86 **Spectre-mitigated libs**», `electron-rebuild`
> падает (ошибка MSB8040). Проект решает это автоматически: `postinstall`
> перед пересборкой выключает `SpectreMitigation` в `node-pty/binding.gyp`
> и `deps/winpty/src/winpty.gyp` (см. `scripts/fix-spectre.js`). Если вы
> собираете сам модуль вручную — либо поставьте Spectre-libs через
> «Visual Studio Installer → Modify → Individual components», либо
> установите в vcxproj `<SpectreMitigation>false</SpectreMitigation>`.
>
> **Windows: пустое окно и `ERR_CONNECTION_REFUSED` при `npm run dev`.**
> В Node ≥ 17 имя `localhost` разрешается в IPv6 `[::1]` в первую очередь,
> поэтому dev-сервер Vite мог слушать только IPv6, в то время как
> рендерер Electron ходил в `127.0.0.1` — окно оставалось пустым.
> Проект уже фиксирует хост: `server.host: '127.0.0.1'` в секции `renderer`
> файла `electron.vite.config.ts`. Если вы добавляли свой dev-сервер или
> меняли конфиг — убедитесь, что он слушает `127.0.0.1` (IPv4), а не
> только `[::1]`.

Импортируйте медиа, монтируйте, жмите «Экспорт». Для ИИ-ассистента
нажмите 🤖 (CLI `claude` должен быть установлен и залогинен). Если для
Claude/npm нужен прокси — создайте `~/.config/kadr/claude-env.json`:
Expand Down
7 changes: 7 additions & 0 deletions electron.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ export default defineConfig({
},
renderer: {
root: '.',
// Bind the dev server to the IPv4 loopback explicitly. On Windows with
// Node >= 17 'localhost' resolves to [::1] first, so Vite can listen on
// IPv6 only — then Electron's renderer (which connects via 127.0.0.1)
// gets ERR_CONNECTION_REFUSED and the window stays blank.
server: {
host: '127.0.0.1'
},
build: {
outDir: 'out/renderer',
rollupOptions: { input: resolve(__dirname, 'index.html') }
Expand Down
Loading