angular - 将 Angular 10 项目转换为 nativescript 共享项目时出现“无法解析 tsconfig.json 文件”错误
问题描述
我首先将 Angular 8 项目更新到 Angular 9,然后是 Angular 10。在成功更新到 10 并运行 ng serve 以确保应用程序仍然正常工作后,我遵循了 nativescript 迁移步骤here。
进入添加@nativescript/schematics 的步骤时,我收到以下错误“无法解析文件 tsconfig.json!”。
我看到了这个stackoverflow问题并将我的 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
}
}
解决方案
最终成为 , 在单个“lib”数组之后。仅仅是一个 JSON 问题,与 angular / nativescript 迁移无关。
希望这可以帮助遇到这个简单但愚蠢的错误的其他人。干杯!
推荐阅读
- python - 未显示以 NaN Y 轴值开始或结束的散景图
- c - 如何检查数组的元素是否为特殊字符?
- python - BeautifulSoup find.all() 网页抓取返回空
- postgresql - 在 Redshift 表上使用 postgresql 在 while 循环内增加日期
- javascript - 如果它不存在,我想在列表中推送一个项目。如果该项目已在列表中,则删除该项目
- android-studio - AAPT:错误:写入 'c: ....\r.txt' 失败:数据无效。(13)
- python - 如何在 Python 中使用对象在类创建中传递参数?
- c# - 使用 Automapper 映射复杂的继承模型
- javascript - 在 google chrome 浏览器中,Web Audio API 无法正常工作
- flutter - 是否可以在底页外启用点击?