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

Vite 执行 build tsc 打包编译报错 #53

Closed
pawover opened this issue Jun 28, 2021 · 3 comments
Closed

Vite 执行 build tsc 打包编译报错 #53

pawover opened this issue Jun 28, 2021 · 3 comments

Comments

@pawover
Copy link
Contributor

pawover commented Jun 28, 2021

node_modules/concent/src/types.d.ts:1728:98 - error TS2344: Type 'undefined' does not satisfy the constraint 'Exclude<keyof RootState, number | symbol>'.

1728 export function getState<RootState extends IRootBase = IRootBase, M extends StrKeys = undefined>

package.json ↓

{
"author": "handpear",
"name": "vite-react-antd-concent-typescript-windicss-alloy-admin",
"version": "0.0.0",
"scripts": {
"dev": "vite --mode development",
"test": "vite --mode test",
"build": "tsc && vite build --mode production",
"preview": "vite preview"
},
"dependencies": {
"antd": "^4.16.5",
"concent": "^2.15.12",
"crypto-js": "^4.0.0",
"nprogress": "^0.2.0",
"qs": "^6.10.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router": "^5.2.0",
"react-router-config": "^5.1.1",
"react-router-dom": "^5.2.0",
"umi-request": "^1.3.9"
},
"devDependencies": {
"@types/crypto-js": "^4.0.1",
"@types/node": "^15.12.5",
"@types/nprogress": "^0.2.0",
"@types/qs": "^6.9.6",
"@types/react": "^17.0.11",
"@types/react-dom": "^17.0.7",
"@types/react-router-config": "^5.0.2",
"@types/react-router-dom": "^5.1.7",
"@typescript-eslint/eslint-plugin": "^4.27.0",
"@typescript-eslint/parser": "^4.27.0",
"@vitejs/plugin-react-refresh": "^1.3.4",
"@vue/compiler-sfc": "^3.1.2",
"autoprefixer": "^10.2.6",
"concent-plugin-redux-devtool": "^2.0.8",
"eslint": "^7.28.0",
"eslint-config-alloy": "^4.1.0",
"eslint-plugin-react": "^7.24.0",
"less": "^4.1.1",
"postcss-assets": "^6.0.0",
"typescript": "^4.3.3",
"vite": "^2.3.8",
"vite-plugin-components": "^0.11.2",
"vite-plugin-html": "^2.0.7",
"vite-plugin-pages": "^0.14.2",
"vite-plugin-style-import": "^1.0.1",
"vite-plugin-windicss": "^1.0.4",
"vite-react-jsx": "^1.1.1",
"windicss": "^3.1.3"
}
}

@fantasticsoul
Copy link
Contributor

好的,我马上看下

@fantasticsoul
Copy link
Contributor

fantasticsoul commented Jun 28, 2021

我本地试了下 vite项目 npm run build 没问题,不过我重新发布了 2.15.13的concent, 优化了下类型写法,你更新concent了再试试

@pawover
Copy link
Contributor Author

pawover commented Jun 29, 2021

谢谢,更新后解决了

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

2 participants