运行项目报错Cannot assign to read only property 'jsx' of object

来源:4-7 作业解答 - ⽤ Hook + TS + TS泛型实现useArray

weixin_慕哥9236013

2021-04-17

我再拷贝项目之后想要运行项目的时候报错:

D:\hook_learn\jira\react-ts-hook-jira\node_modules\react-scripts\scripts\utils\verifyTypeScriptSetup.js:239
      appTsConfig.compilerOptions[option] = value;
                                          ^

TypeError: Cannot assign to read only property 'jsx' of object '#<Object>'

请问怎么解决?

写回答

1回答

Nolan

2021-04-17

这个看起来是版本问题,解决方案看这里:https://github.com/facebook/create-react-app/issues/10110#issuecomment-731503635

1
1
INEEDAMONITOR
哇!这个issue好使,google了半天都没有找到解决方案。
2023-09-15
共1条回复

React17+Hook+TS4 优质实践,仿 Jira 企业级项目

解锁 React17 高阶用法,轻松应对大型复杂长周期项目

2691 学习 · 1236 问题

查看课程