Thanks for the app :)
I tried to use these lines to start in dev mode on my Linux machine:
|
To run the application in development mode: |
|
|
|
``` |
|
# Start the Vite dev server |
|
npm run dev |
|
|
|
# In a separate terminal, start Electron |
|
npm run dev:electron |
|
``` |
But I got this output on the second command:
$ npm run dev:electron
> pastemax@v1.1.0-stable dev:electron
> node electron/dev.js
🚀 Starting development environment...
📦 Starting Vite dev server...
> pastemax@v1.1.0-stable dev
> vite
Port 5173 is in use, trying another one...
VITE v6.3.6 ready in 202 ms
➜ Local: http://localhost:5174/
🔍 Detected Vite server running on port 5174
🔌 Starting Electron app with Vite server at port 5174...
➜ Network: use --host to expose
➜ press h + enter to show help
> pastemax@v1.1.0-stable start
> electron .
/home/scott/codes/pastemax/node_modules/.pnpm/electron@34.5.8/node_modules/electron/index.js:17
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again');
^
Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (/home/scott/codes/pastemax/node_modules/.pnpm/electron@34.5.8/node_modules/electron/index.js:17:11)
at Object.<anonymous> (/home/scott/codes/pastemax/node_modules/.pnpm/electron@34.5.8/node_modules/electron/index.js:21:18)
at Module._compile (node:internal/modules/cjs/loader:1734:14)
at Object..js (node:internal/modules/cjs/loader:1899:10)
at Module.load (node:internal/modules/cjs/loader:1469:32)
at Function._load (node:internal/modules/cjs/loader:1286:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Module.require (node:internal/modules/cjs/loader:1491:12)
at require (node:internal/modules/helpers:135:16)
Node.js v23.11.1
I was able to resolve this with:
npm install electron@34.5.2
But it still doesn't want to use the existing dev server:
$ npm run dev:electron
> pastemax@v1.1.0-stable dev:electron
> node electron/dev.js
🚀 Starting development environment...
📦 Starting Vite dev server...
> pastemax@v1.1.0-stable dev
> vite
Port 5173 is in use, trying another one...
VITE v6.3.4 ready in 202 ms
➜ Local: http://localhost:5174/
🔍 Detected Vite server running on port 5174
🔌 Starting Electron app with Vite server at port 5174...
➜ Network: use --host to expose
➜ press h + enter to show help
> pastemax@v1.1.0-stable start
> electron .
Successfully loaded tiktoken module
Tiktoken encoder initialized successfully
I have to kill the manually spawned dev server to free port 5173 (or otherwise adjust the code to accommodate the port change).
Thanks for the app :)
I tried to use these lines to start in dev mode on my Linux machine:
pastemax/README.md
Lines 123 to 131 in 1949259
But I got this output on the second command:
I was able to resolve this with:
But it still doesn't want to use the existing dev server:
I have to kill the manually spawned dev server to free port 5173 (or otherwise adjust the code to accommodate the port change).