[英]“Can't parse tsconfig.json file” error when converting Angular 10 project to nativescript shared project
I updated an Angular 8 project first to Angular 9 then Angular 10. After successfully updating to 10 and running ng serve to make sure the application still correctly works I followed the nativescript migration steps here .我首先将 Angular 8 项目更新为 Angular 9,然后是 Angular 10。在成功更新到 10 并运行 ng serve 以确保应用程序仍然正常工作后,我遵循了此处的 nativescript 迁移步骤。
When getting to the step where I add @nativescript/schematics I get the following error "File tsconfig.json could not be parsed!".当进入添加@nativescript/schematics 的步骤时,出现以下错误“无法解析文件 tsconfig.json!”。
I saw this stackoverflow question and plugged my tsconfig.json into the compiler and still couldn't figure out what was causing the error.我看到了这个stackoverflow问题并将我的 tsconfig.json 插入编译器,但仍然无法弄清楚是什么导致了错误。 All brackets seem to be closed directly.
所有括号似乎直接关闭。
Any help on this is greatly appreciated!非常感谢您对此的任何帮助! Below is the code in my tsconfig.json:
下面是我的 tsconfig.json 中的代码:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
],
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
Ended up being the , after the single "lib" array.最终成为 , 在单个“lib”数组之后。 Was solely a JSON issue and not anything with the angular / nativescript migration.
只是一个 JSON 问题,与 angular / nativescript 迁移无关。
Hope this helps someone else that ran into this simple but goofy error.希望这可以帮助遇到这个简单但愚蠢的错误的其他人。 cheers!
干杯!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.