Typescript Error: Cannot read the length of the undefined property when running ng-serve

padmavathi @ K1037 C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard

ng serves Unable to read the length of the undefinedTypeError property: cannot read the length of the undefined property on createSourceFile (C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ typescript \ lib \ typescript.js: 8980: 109) on parseSourceFileWorker ( C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ typescript \ lib \ typescript.js: 8940: 26) in Object.parseSourceFile (C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ typescript \ lib \ typescript.js: 8899: 26) in Object.createSourceFile (C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ typescript \ lib \ typescript.js: 8727 : 29) on the new TypeScriptFileRefactor (C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ @ngtools \ webpack \ src \ refactor.js: 25:35) in Object.resolveEntryModuleFromMain (C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ @ngtools \ webpack \ src \ entry_resolver.js: 108: 18) in AotPlugin._setupOptions (C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ @ngtools \ webpack \ src \ plugin.js: 129: 58) on the new AotPlugin (C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ @ngtools \ webpack \ src \ plugin.js: 37: 14) in Object.exports.getWebpackNonAotConfigPartial (C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ angular-cli \ models \ webpack-build- typescript.js: 20: 13) on the new NgCliWebpackConfig (C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ angular-cli \ models \ webpack-config.js: 23: 42 ) in Class.run (C:\ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ angular-cli \ tasks \ serve-webpack.js: 20:22) in C: \ Users \ padmavathi \ Downloads \ phototype-development \ web \ dashboard \ node_modules \ angular-cli \ commands \ serve.js: 102: 26 on process._tickCallback (internal / process / next_tick.js: 103: 7)

+4
1

. , angular -cli.json.

{
  "project": {
    "version": "1.0.0-beta.22-1",
    "name": "angular3"
  },
  "apps": [
    {
      "root": "src",/* This must point to your source file locations*/
      "outDir": "dist",/* your output folder */

/ , undefined.

+1

Source: https://habr.com/ru/post/1663813/


All Articles