kantaroso / game-information

0 stars 0 forks source link

typescript41へ上げる #32

Closed kantaroso closed 2 years ago

kantaroso commented 2 years ago

概要

下記エラーで本番用buildが通らない

/var/www/front # npm run build

> front@0.1.0 build
> vue-cli-service build --mode production

⠸  Building for production...Starting type checking service...
Using 1 worker with 2048MB memory limit
⠋  Building for production...

 ERROR  Failed to compile with 5 errors                                                                                                     9:10:05 AM

 error  in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts

ERROR in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts(26,28):
26:28 ']' expected.
    24 |  */
    25 | export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
  > 26 |     [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
       |                            ^
    27 | };
    28 | /**
    29 |  * Returns a special value that can be used with {@link (setDoc:1)} or {@link

 error  in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts

ERROR in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts(26,47):
26:47 ';' expected.
    24 |  */
    25 | export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
  > 26 |     [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
       |                                               ^
    27 | };
    28 | /**
    29 |  * Returns a special value that can be used with {@link (setDoc:1)} or {@link

 error  in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts

ERROR in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts(26,49):
26:49 Expression expected.
    24 |  */
    25 | export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
  > 26 |     [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
       |                                                 ^
    27 | };
    28 | /**
    29 |  * Returns a special value that can be used with {@link (setDoc:1)} or {@link

 error  in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts

ERROR in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts(26,50):
26:50 Expression expected.
    24 |  */
    25 | export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
  > 26 |     [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
       |                                                  ^
    27 | };
    28 | /**
    29 |  * Returns a special value that can be used with {@link (setDoc:1)} or {@link

 error  in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts

ERROR in /var/www/front/node_modules/@firebase/firestore/dist/index.d.ts(27,1):
27:1 Declaration or statement expected.
    25 | export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
    26 |     [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
  > 27 | };
       | ^
    28 | /**
    29 |  * Returns a special value that can be used with {@link (setDoc:1)} or {@link
    30 |  * updateDoc:1} that tells the server to remove the given elements from any

 ERROR  Build failed with errors.

○参考 https://githubmemory.com/repo/firebase/firebase-js-sdk/issues/5642 https://zenn.dev/hedrall/articles/6f94763fc6a1cc#key-remapping-in-mapped-types-v4.1