JSON 中第 437 位的意外标记 }

编程入门 行业动态 更新时间:2024-10-28 21:18:25
本文介绍了JSON 中第 437 位的意外标记 }的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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:关键词]

本文发布于:2023-04-26 13:23:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1135686.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:标记   意外   JSON

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!