No Exported Member / Node Modules

前端 未结 5 992
春和景丽
春和景丽 2021-02-13 06:22

I am just starting Angular 2 / Typescript using the 5 Minute Quickstart found here. I\'ve run into what looks to be a common problem, but maybe a bit different. I am encounter

5条回答
  •  时光取名叫无心
    2021-02-13 06:29

    The NgModule class is exported from the node_modules/@angular/core/src/metadata.d.ts file through the node_modules/@angular/core/index.d.ts one.

    I wonder if you specify correctly the moduleResolution property in your tsconfig.json file:

    {
      "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "moduleResolution": "node", // <-----
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": false,
        "noImplicitAny": false
      }
    }
    

提交回复
热议问题