【发布时间】:2020-10-29 14:38:54
【问题描述】:
**Trying to set the path inside tsconfig.json for compiler to treat src as baseUrl in react typescript project**
{
"compilerOptions": {
"target": "es5",
"baseUrl": "src",
"paths": {
"*": ["src/*"]
}
"include": [
"src"
]
}
但出现如下错误:
TypeError: Cannot assign to read only property 'paths' of object '#<Object>'
at verifyTypeScriptSetup (/Users/apple/Documents/projects/my-app/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js:239:43)
这是因为文件夹权限还是配置中缺少任何东西
【问题讨论】:
标签: reactjs typescript tsconfig