老师 开发完组件后 build 出现的问题,生成storybook这些没有问题
来源:12-6 驯服 tsc - tsconfig 编写第二部分

想翻身的码工
2020-04-23
“scripts”: {
“start”: “react-scripts start”,
“clean”: “rimraf ./dist”,
“build”: “npm run clean && npm run build-ts && npm run build-css”,
“test”: “react-scripts test”,
“eject”: “react-scripts eject”,
“build-ts”: “tsc -p tsconfig.build.json”,
“build-css”: “node-sass ./src/styles/index.scss ./dist/index.css”,
“storybook”: “start-storybook -p 9009 -s public”,
“build-storybook”: “build-storybook -s public”
}
node_modules/@types/react-transition-group/node_modules/@types/react/index.d.ts:3134:13 - error TS2717: Subsequent property
declarations must have the same type. Property ‘view’ must be of type ‘SVGProps’, but here has type ‘SVGProps’.
1回答
-
同学你好 google 以后得到了如下答案,你可以试试 https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24711#issuecomment-379167539
你是否使用 yarn 来安装管理包?
Try deleting your yarn.lock and let it create a fresh one, then it worked for me with the most recent @types/react version.
删除 yarn.lock 文件以后,重新安装依赖试一试
012020-04-24
相似问题
回答 5