Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue项目, vite打包报错 #25

Open
huihui14569 opened this issue Mar 22, 2024 · 0 comments
Open

vue项目, vite打包报错 #25

huihui14569 opened this issue Mar 22, 2024 · 0 comments

Comments

@huihui14569
Copy link

报错信息如下
`$ vue-tsc --noEmit && vite build --config ./config/vite.config.prod.ts
node_modules/date-utils-2020/src/index.ts:91:5 - error TS2322: Type 'T & Date' is not assignable to type 'null'.

91 result = input
~~~~~~

node_modules/date-utils-2020/src/index.ts:97:5 - error TS2322: Type 'Date' is not assignable to type 'null'.

97 result = new Date(input)
~~~~~~

node_modules/date-utils-2020/src/index.ts:107:9 - error TS2322: Type 'Date' is not assignable to type 'null'.

107 result = new Date([str.substring(0, 4), str.substring(4, 6), str.substring(6, 8)].join('/'))
~~~~~~

node_modules/date-utils-2020/src/index.ts:111:9 - error TS2322: Type 'Date' is not assignable to type 'null'.

111 result = new Date([str.substring(0, 4), str.substring(4, 6), '01'].join('/'))
~~~~~~

node_modules/date-utils-2020/src/index.ts:115:9 - error TS2322: Type 'Date' is not assignable to type 'null'.

115 result = new Date(str + '/01/01')
~~~~~~

node_modules/date-utils-2020/src/index.ts:120:9 - error TS2322: Type 'Date' is not assignable to type 'null'.

120 result = new Date(parseInt(input))
~~~~~~

node_modules/date-utils-2020/src/index.ts:136:9 - error TS2322: Type 'Date' is not assignable to type 'null'.

136 result = new Date([RegExp.$1, RegExp.$2, RegExp.$3].join('/'))
~~~~~~

node_modules/date-utils-2020/src/index.ts:140:9 - error TS2322: Type 'Date' is not assignable to type 'null'.

140 result = new Date([RegExp.$1, RegExp.$2, '01'].join('/'))
~~~~~~

node_modules/date-utils-2020/src/index.ts:142:9 - error TS2322: Type 'Date' is not assignable to type 'null'.

142 result = new Date(str)
~~~~~~

node_modules/date-utils-2020/src/index.ts:146:34 - error TS2339: Property 'getFullYear' does not exist on type 'never'.

146 return result && !isNaN(result.getFullYear()) ? result : null
~~~~~~~~~~~

node_modules/zx-sml/libs/utils/src/dom.ts:69:22 - error TS2488: Type 'NodeListOf' must have a 'Symbol.iterator' method that returns an iterator.

69 el.append(...temp.childNodes)
~~~~~~~~~~~~~~~

Found 11 errors in 2 files.

Errors Files
10 node_modules/date-utils-2020/src/index.ts:91
1 node_modules/zx-sml/libs/utils/src/dom.ts:69
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant