Skip to content

npm run build fails during type-check with vite v4.5.14 #2

@neuhaus

Description

@neuhaus

I'm on Ubuntu 22.04.05 with nodejs 20.19.3.
Looks like there is some environmental or dependency drift because after running "npm install" (which gives several warnings about deprecated packages and 8 moderate severity vulnerabilities), i try to run "npm run build" and get a bunch of errors during type-check:

$ npm run build

> authenticator.inbrowser.app@0.0.0 build
> run-p type-check build-only


> authenticator.inbrowser.app@0.0.0 type-check
> vue-tsc --noEmit -p tsconfig.vitest.json --composite false


> authenticator.inbrowser.app@0.0.0 build-only
> vite build

vite v4.5.14 building for production...
transforming (5183) node_modules/@vicons/fluent/es/CheckmarkLock20Filled.jssrc/components/otp/config/OTPURIInput.vue:51:11 - error TS2322: Type 'number | (({ timestamp }?: { timestamp?: number | undefined; } | undefined) => number)' is not assignable to type 'number'.
  Type '({ timestamp }?: { timestamp?: number | undefined; } | undefined) => number' is not assignable to type 'number'.

51           counter: parsedOtp.counter,
             ~~~~~~~

  src/data/otp/hotp/types.ts:8:3
    8   counter: number;
        ~~~~~~~
    The expected type comes from property 'counter' which is declared here on type 'HOTPOptions'

src/components/otp/config/OTPURIInput.vue:57:28 - error TS2339: Property 'label' does not exist on type 'never'.

57           label: parsedOtp.label,
                              ~~~~~

src/components/otp/config/OTPURIInput.vue:58:29 - error TS2339: Property 'issuer' does not exist on type 'never'.

58           issuer: parsedOtp.issuer,
                               ~~~~~~

src/components/otp/config/OTPURIInput.vue:59:29 - error TS2339: Property 'secret' does not exist on type 'never'.

59           secret: parsedOtp.secret.base32,
                               ~~~~~~

src/components/otp/config/OTPURIInput.vue:61:29 - error TS2339: Property 'digits' does not exist on type 'never'.

61           digits: parsedOtp.digits,
                               ~~~~~~

src/components/otp/config/OTPURIInput.vue:62:32 - error TS2339: Property 'algorithm' does not exist on type 'never'.

62           algorithm: parsedOtp.algorithm,
                                  ~~~~~~~~~

src/components/otp/config/OTPURIInput.vue:63:29 - error TS2339: Property 'period' does not exist on type 'never'.

63           period: parsedOtp.period,
                               ~~~~~~

src/components/otp/import/camera/CameraImport.vue:92:5 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

92     show.value = false;
       ~~~~~~~~~~

src/components/otp/import/camera/CameraImport.vue:125:13 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

125             show.value = false;
                ~~~~~~~~~~

src/components/otp/import/camera/CameraImport.vue:145:13 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

145             show.value = false;
                ~~~~~~~~~~

src/components/otp/import/manual/ManualImport.vue:85:5 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

85     show.value = false;
       ~~~~~~~~~~

src/components/otp/import/picture/PictureImport.vue:75:9 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

75         show.value = false;
           ~~~~~~~~~~

src/components/otp/import/picture/PictureImport.vue:94:9 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

94         show.value = false;
           ~~~~~~~~~~

src/components/otp/import/screen/ScreenCaptureImport.vue:90:5 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

90     show.value = false;
       ~~~~~~~~~~

src/components/otp/import/screen/ScreenCaptureImport.vue:123:13 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

123             show.value = false;
                ~~~~~~~~~~

src/components/otp/import/screen/ScreenCaptureImport.vue:143:13 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

143             show.value = false;
                ~~~~~~~~~~

src/components/otp/import/uri/URIImport.vue:76:5 - error TS2322: Type 'boolean' is not assignable to type 'S'.
  'S' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.

76     show.value = false;
       ~~~~~~~~~~

src/data/otp/parseURIToOTPOptions.ts:17:7 - error TS2322: Type 'number | (({ timestamp }?: { timestamp?: number | undefined; } | undefined) => number)' is not assignable to type 'number'.
  Type '({ timestamp }?: { timestamp?: number | undefined; } | undefined) => number' is not assignable to type 'number'.

17       counter: parsedOtp.counter,
         ~~~~~~~

  src/data/otp/hotp/types.ts:8:3
    8   counter: number;
        ~~~~~~~
    The expected type comes from property 'counter' which is declared here on type 'HOTPOptions'

src/data/otp/parseURIToOTPOptions.ts:22:24 - error TS2339: Property 'label' does not exist on type 'never'.

22       label: parsedOtp.label,
                          ~~~~~

src/data/otp/parseURIToOTPOptions.ts:23:25 - error TS2339: Property 'issuer' does not exist on type 'never'.

23       issuer: parsedOtp.issuer,
                           ~~~~~~

src/data/otp/parseURIToOTPOptions.ts:24:25 - error TS2339: Property 'secret' does not exist on type 'never'.

24       secret: parsedOtp.secret.base32,
                           ~~~~~~

src/data/otp/parseURIToOTPOptions.ts:26:25 - error TS2339: Property 'digits' does not exist on type 'never'.

26       digits: parsedOtp.digits,
                           ~~~~~~

src/data/otp/parseURIToOTPOptions.ts:27:28 - error TS2339: Property 'algorithm' does not exist on type 'never'.

27       algorithm: parsedOtp.algorithm,
                              ~~~~~~~~~

src/data/otp/parseURIToOTPOptions.ts:28:25 - error TS2339: Property 'period' does not exist on type 'never'.

28       period: parsedOtp.period,
                           ~~~~~~


Found 24 errors in 7 files.

Errors  Files
     7  src/components/otp/config/OTPURIInput.vue:51
     3  src/components/otp/import/camera/CameraImport.vue:92
     1  src/components/otp/import/manual/ManualImport.vue:85
     2  src/components/otp/import/picture/PictureImport.vue:75
     3  src/components/otp/import/screen/ScreenCaptureImport.vue:90
     1  src/components/otp/import/uri/URIImport.vue:76
     7  src/data/otp/parseURIToOTPOptions.ts:17
ERROR: "type-check" exited with 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions