简体   繁体   English

使用 ng serve 在 angular 中发生未处理的异常

[英]An unhandled exception occurred in angular using ng serve

Hi I am Trying to Run an admin Panel With Angular but when I Want To Run the Project I get The following Error嗨,我正在尝试使用 Angular 运行管理面板,但是当我想运行项目时出现以下错误

**An unhandled exception occurred: error TS5058: The specified path does not exist: 'D:/tsconfig.json'.**

This Is My TsConfig Code这是我的 TsConfig 代码

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "esnext",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "ES5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ],
    "paths": {
      "@config/*": ["app/config/*"],
      "@core/*": ["app/modules/core/*"],
      "@menu/*": ["app/modules/menu/*"],
      "@shared/*": ["app/modules/shared/*"],
      "@user/*": ["app/modules/user/*"],
      "exceljs":[
        "node_modules/exceljs/dist/exceljs.min"
      ]
    }
  },
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true
  }
}

what Should I do To fix The problem?我应该怎么做才能解决这个问题?

If you have something similar in your tsconfig.app.json like this:如果您的 tsconfig.app.json 中有类似的内容,如下所示:

"extends": "/tsconfig.json",

then you should fix the path.那么你应该修复路径。 Maybe:也许:

"extends": "../tsconfig.json",

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 运行 ng serve 发生未处理的异常 - Unhandled exception occurred running ng serve angular ng serve 命令抛出错误:发生未处理的异常:项目不存在 - angular ng serve command throws error: An unhandled exception occurred: Project does not exist Angular ng 服务导致:发生未处理的异常:未在工作区中设置配置“生产” - Angular ng serve leads to: An unhandled exception occurred: Configuration 'production' is not set in the workspace 发生未处理的异常:在工作空间中未设置配置'es5'。 ng在角度8中投放es5 - An unhandled exception occurred: Configuration 'es5' is not set in the workspace. ng serve in angular 8 for es5 发生未处理的异常:无法使用 ng serve 找到模块“@angular/compiler-cli” - An unhandled exception occurred: Cannot find module '@angular/compiler-cli' with ng serve Angular cli 显示错误“发生未处理的异常:没有项目支持‘测试’目标。” 运行 ng test 或 ng serve 命令时 - Angular cli showing error "An unhandled exception occurred: No projects support the 'test' target." when running ng test or ng serve command 我在尝试执行 ng serve 时收到此错误“发生未处理的异常:找不到模块'@angular/compiler-cli' - I Get this error when im trying to execute ng serve "An unhandled exception occurred: Cannot find module '@angular/compiler-cli' ng test 和 ng serve 失败,并显示“发生未处理的异常:无效或意外的令牌” - ng test and ng serve fails with "An unhandled exception occurred: Invalid or unexpected token" 当我执行ng serve -o时,发生未处理的异常:ts.createNodeArray不是函数 - When I am doing ng serve -o then getting an unhandled exception occurred: ts.createNodeArray is not a function Ng 使用 Angular 10 项目时的构建问题 - [发生未处理的异常:作业名称“..getProjectMetadata”不存在。] - Ng Build issues when using Angular 10 project - [An unhandled exception occurred: Job name “..getProjectMetadata” does not exist.]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM