ItsRiprod / DeskThing

Desk Thing: The Discord Thing, Trello Thing, The Weather Thing, The Macro Thing, Just not The Car Thing anymore
MIT License
137 stars 6 forks source link

server build and runtime errors: electron-vite/node definition file error, "activeRequestId" not used, failed to load image #9

Closed chaseadam closed 1 month ago

chaseadam commented 1 month ago

Main readme no longer references the server or how to run the DeskThingServer

attempts to run npm run build result in error

➜  DeskThingServer git:(main) ✗ npm run build

> deskthing@0.5.3 build
> npm run typecheck && electron-vite build

> deskthing@0.5.3 typecheck
> npm run typecheck:node && npm run typecheck:web

> deskthing@0.5.3 typecheck:node
> tsc --noEmit -p tsconfig.node.json --composite false

error TS2688: Cannot find type definition file for 'electron-vite/node'.
  The file is in the program because:
    Entry point of type library 'electron-vite/node' specified in compilerOptions

  tsconfig.node.json:6:15
    6     "types": ["electron-vite/node"]
                    ~~~~~~~~~~~~~~~~~~~~
    File is entry point of type library specified here.

tsconfig.node.json:2:14 - error TS6053: File '@electron-toolkit/tsconfig/tsconfig.node.json' not found.

2   "extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 2 errors in the same file, starting at: tsconfig.node.json:2

after a npm install run get a different error

➜  DeskThingServer git:(main) ✗ npm install
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead

> deskthing@0.5.3 postinstall
> electron-builder install-app-deps

  • electron-builder  version=24.13.3
  • loaded configuration  file=/home/achasen/git/DeskThing/DeskThingServer/electron-builder.yml

added 702 packages, and audited 703 packages in 17s

167 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
➜  DeskThingServer git:(main) ✗ npm run build

> deskthing@0.5.3 build
> npm run typecheck && electron-vite build

> deskthing@0.5.3 typecheck
> npm run typecheck:node && npm run typecheck:web

> deskthing@0.5.3 typecheck:node
> tsc --noEmit -p tsconfig.node.json --composite false

> deskthing@0.5.3 typecheck:web
> tsc --noEmit -p tsconfig.web.json --composite false

src/renderer/src/store/requestStore.ts:15:11 - error TS6133: 'activeRequestId' is declared but its value is never read.

15   private activeRequestId: string | null
             ~~~~~~~~~~~~~~~

Found 1 error in src/renderer/src/store/requestStore.ts:15

commenting out "activeRequestId" lines result in success

further npm run is successful, but don't see any apps (even after "request apps") and attempts to upload result in:

(node:1365726) UnhandledPromiseRejectionWarning: Error: Failed to load image from path '/home/achasen/git/DeskThing/DeskThingServer/resources/icon.ico'
    at initializeTray (/home/achasen/git/DeskThing/DeskThingServer/out/main/index.js:212:10)
    at /home/achasen/git/DeskThing/DeskThingServer/out/main/index.js:317:5
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:1365726) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
Error occurred in handler for 'select-zip-file': Error: No handler registered for 'select-zip-file'
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:78076)
    at WebContents.emit (node:events:517:28)
Error occurred in handler for 'select-zip-file': Error: No handler registered for 'select-zip-file'
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:78076)
    at WebContents.emit (node:events:517:28)
ItsRiprod commented 1 month ago

I would avoid pulling the main branch and stick to using releases - the main branch can be pretty buggy at times - especially with v0.5.3 currently. It's currently facing a couple issues because I just had to recode basically every app and the webapp to establish new data types to be passed between them. It should be ready here soon though.

chaseadam commented 1 month ago

Thanks! I will wait for a release :)