问题描述
限时送ChatGPT账号..我使用的是 Angular 5.0.0.我想连接 angular-bootstrap-md
.但是当您启动应用程序 ng s
时会发生错误.
I'm using Angular 5.0.0. And I want to connect angular-bootstrap-md
. But when you start the application ng s
an error occurs.
错误 TS5014:解析文件失败'C:/Users/Admin/Desktop/angular/tsconfig.json': Unexpected token } in位置 437 处的 JSON.
error TS5014: Failed to parse file 'C:/Users/Admin/Desktop/angular/tsconfig.json': Unexpected token } in JSON at position 437.
错误:错误 TS5014:解析文件失败'C:/Users/Admin/Desktop/angular/tsconfig.json': Unexpected token } in位置 437 处的 JSON.在 AngularCompilerPlugin._setupOptions (C:\Users\Admin\Desktop\angular\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:90:19)在新的 AngularCompilerPlugin(C:\Users\Admin\Desktop\angular\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:43:14)在 _createAotPlugin(C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\models\webpack-configs\typescript.js:77:16)在 Object.getNonAotConfig (C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\models\webpack-configs\typescript.js:100:19)在 NgCliWebpackConfig.buildConfig(C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\models\webpack-config.js:37:37)在 Class.run (C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\tasks\serve.js:71:98)在 check_port_1.checkPort.then.port (C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\commands\serve.js:123:26)在 process._tickCallback (internal/process/next_tick.js:68:7)
Error: error TS5014: Failed to parse file 'C:/Users/Admin/Desktop/angular/tsconfig.json': Unexpected token } in JSON at position 437. at AngularCompilerPlugin._setupOptions (C:\Users\Admin\Desktop\angular\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:90:19) at new AngularCompilerPlugin (C:\Users\Admin\Desktop\angular\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:43:14) at _createAotPlugin (C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\models\webpack-configs\typescript.js:77:16) at Object.getNonAotConfig (C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\models\webpack-configs\typescript.js:100:19) at NgCliWebpackConfig.buildConfig (C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\models\webpack-config.js:37:37) at Class.run (C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\tasks\serve.js:71:98) at check_port_1.checkPort.then.port (C:\Users\Admin\Desktop\angular\node_modules\@angular\cli\commands\serve.js:123:26) at process._tickCallback (internal/process/next_tick.js:68:7)
第一个括号以红色突出我不明白为什么似乎所有括号都关闭
The first bracket stands out in red I can not understand why it seems all the brackets are closed
tsconfig.json:
tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
},
"include": ["node_modules/angular-bootstrap-md/**/*.ts", "src/**/*.ts"],
}
推荐答案
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
},
"include": ["node_modules/angular-bootstrap-md/**/*.ts", "src/**/*.ts"]
}
这篇关于JSON 中第 437 位的意外标记 }的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论