Skip to content

BUG: build fails with 3 x TS2345 errors #6

@fmjrey

Description

@fmjrey

Version (please complete the following information):

Describe the bug

Cannot build due to some compilation error, see below. Installed latest version of node and other dev tools with homebrew, so I suspect something changed in the dev dependencies. Building upstream repo does work.
Not sure how to fix this one as I'm not that familiar with frontend tech and only wanted to make a small change to fix bug #4.

developer@computer:logseq-clipper$ npm run build

> logseq-clipper@0.10.5 build
> npm run build:chrome && npm run build:firefox && npm run build:safari


> logseq-clipper@0.10.5 build:chrome
> webpack --env BROWSER=chrome --mode production

assets by status 1.99 MiB [cached] 38 assets
orphan modules 1.59 MiB (javascript) 1.87 KiB (runtime) [orphan] 1580 modules
runtime modules 1.29 KiB 6 modules
built modules 1.64 MiB (javascript) 70.6 KiB (css/mini-extract) [built]
  modules by path ./src/ 1.33 MiB (javascript) 70.6 KiB (css/mini-extract)
    optional modules 265 KiB [optional] 19 modules
    modules by path ./src/*.scss 100 bytes (javascript) 70.6 KiB (css/mini-extract) 4 modules
    modules by path ./src/core/*.ts 997 KiB 2 modules
    modules by path ./src/*.ts 99.6 KiB 2 modules
  modules by path ./node_modules/ 315 KiB
    modules by path ./node_modules/dayjs/ 18.3 KiB 6 modules
    modules by path ./node_modules/@mozilla/readability/*.js 86.3 KiB
      ./node_modules/@mozilla/readability/index.js 226 bytes [built] [code generated]
      + 2 modules
    + 4 modules

WARNING in ./src/style.scss 
>>> removed some scss warnings <<<
@ ./src/style.scss

ERROR in /home/developer/Dev/Clojure/logseq/logseq-clipper/src/background.ts
50:38-158
[tsl] ERROR in /home/developer/Dev/Clojure/logseq/logseq-clipper/src/background.ts(50,39)
      TS2345: Argument of type '(request: unknown, sender: browser.Runtime.MessageSender, sendResponse: (response?: any) => void) => true | undefined' is not assignable to parameter of type 'OnMessageListener'.
  Type '(request: unknown, sender: browser.Runtime.MessageSender, sendResponse: (response?: any) => void) => true | undefined' is not assignable to type 'OnMessageListenerCallback'.
    Type 'true | undefined' is not assignable to type 'true'.
      Type 'undefined' is not assignable to type 'true'.

ERROR in /home/developer/Dev/Clojure/logseq/logseq-clipper/src/content.ts
26:39-80
[tsl] ERROR in /home/developer/Dev/Clojure/logseq/logseq-clipper/src/content.ts(26,40)
      TS2345: Argument of type '(request: any, sender: MessageSender, sendResponse: (response: unknown) => void) => true | undefined' is not assignable to parameter of type 'OnMessageListener'.
  Type '(request: any, sender: MessageSender, sendResponse: (response: unknown) => void) => true | undefined' is not assignable to type 'OnMessageListenerCallback'.
    Type 'true | undefined' is not assignable to type 'true'.
      Type 'undefined' is not assignable to type 'true'.

ERROR in /home/developer/Dev/Clojure/logseq/logseq-clipper/src/core/popup.ts
198:39-137
[tsl] ERROR in /home/developer/Dev/Clojure/logseq/logseq-clipper/src/core/popup.ts(198,40)
      TS2345: Argument of type '(request: any, sender: browser.Runtime.MessageSender, sendResponse: (response?: any) => void) => true | undefined' is not assignable to parameter of type 'OnMessageListener'.
  Type '(request: any, sender: browser.Runtime.MessageSender, sendResponse: (response?: any) => void) => true | undefined' is not assignable to type 'OnMessageListenerCallback'.
    Type 'true | undefined' is not assignable to type 'true'.
      Type 'undefined' is not assignable to type 'true'.

3 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.99.6 compiled with 3 errors and 6 warnings in 11342 ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions