2.7.x Building legacy bundle for production | Declaration or statement expected.

This issue has been tracked since 2022-07-29.

Version

2.7.8

Reproduction link

stackblitz.com

Steps to reproduce

Screen Shot 2022-07-29 at 11 20 06

(node:9752) [DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_HASH] DeprecationWarning: [hash] is now [fullhash] (also consider using [chunkhash] or [contenthash], see documentation for details)
(Use node --trace-deprecation ... to show where the warning was created)
â ´ Building legacy bundle for production...

ERROR Failed to compile with 4 errors

error in node_modules/vue/types/jsx.d.ts:39:7

TS1110: Type expected.
37 | * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
38 | */

39 | [v: --${string}]: string | number | undefined
| ^^^^^
40 | }
41 |
42 | type Booleanish = boolean | 'true' | 'false'

error in node_modules/vue/types/jsx.d.ts:39:20

TS1005: ';' expected.
37 | * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
38 | */

39 | [v: --${string}]: string | number | undefined
| ^
40 | }
41 |
42 | type Booleanish = boolean | 'true' | 'false'

error in node_modules/vue/types/jsx.d.ts:39:21

TS1128: Declaration or statement expected.
37 | * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
38 | */

39 | [v: --${string}]: string | number | undefined
| ^
40 | }
41 |
42 | type Booleanish = boolean | 'true' | 'false'

error in node_modules/vue/types/jsx.d.ts:40:1

TS1128: Declaration or statement expected.
38 | */
39 | [v: --${string}]: string | number | undefined

40 | }
| ^
41 |
42 | type Booleanish = boolean | 'true' | 'false'
43 | type Numberish = number | string

ERROR Error: Build failed with errors.
Error: Build failed with errors.

What is expected?

to build success

What is actually happening?

gettin error and doesnt build project

posva wrote this answer on 2022-07-30

You need to upgrade your TypeScript version to support string literals

ademyalcin27 wrote this answer on 2022-07-30

You need to upgrade your TypeScript version to support string literals

thank you. that's worked;)

More Details About Repo
Owner Name vuejs
Repo Name vue
Full Name vuejs/vue
Language TypeScript
Created Date 2013-07-29
Updated Date 2022-10-03
Star Count 199758
Watcher Count 6095
Fork Count 32874
Issue Count 590

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date