Jiw*_*ong 3 reactjs antd react-app-rewired
我正在使用带有打字稿的 create-react-app 模板。在我的本地电脑上,运行构建成功,但是在 CI 服务器上运行时,构建失败。
./src/store/redux/info/index.ts 语法错误:Cannot read property 'name' of undefined (0:undefined)
但是文件中没有“名称”属性
信息/索引.ts
export { default } from "./reducer";
export * from "./actions";
export * from "./types";
Run Code Online (Sandbox Code Playgroud)
"react": "16.12.0",
"react-app-rewired": "2.1.5",
"antd": "3.26.5",
"antd-theme-webpack-plugin": "1.3.0",
"typescript": "3.7.4",
Run Code Online (Sandbox Code Playgroud)
"build": "react-app-rewired --max-old-space-size=8192 build",
Run Code Online (Sandbox Code Playgroud)
小智 6
这似乎是 'typescript-eslint' 的问题。
可以通过将 Typescript 版本更新为 3.8.x 来解决- 正如用户Phoebus在另一个问题中指出的那样:https : //stackoverflow.com/a/60734819/5758225
Github 问题(以及评论中的 PR 链接):https : //github.com/typescript-eslint/typescript-eslint/issues/1746
| 归档时间: |
|
| 查看次数: |
3178 次 |
| 最近记录: |