beta.31 - Cannot read property 'length' of undefined
OS?
Linux Mint 18 x64
Versions.
@angular/cli: 1.0.0-beta.31 node: 6.9.5 os: linux x64 @angular/common: 2.4.7 @angular/compiler: 2.4.7 @angular/core: 2.4.7 @angular/forms: 2.4.7 @angular/http: 2.4.7 @angular/material: 2.0.0-beta.2 @angular/platform-browser: 2.4.7 @angular/platform-browser-dynamic: 2.4.7 @angular/router: 3.1.1 @angular/cli: 1.0.0-beta.31 @angular/compiler-cli: 2.4.7
Repro steps.
ng serve
The log given by the failure.
TypeError: Cannot read property 'length' of undefined
at createSourceFile (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:8980:109)
at parseSourceFileWorker (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:8940:26)
at Object.parseSourceFile (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:8899:26)
at Object.createSourceFile (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:8727:29)
at WebpackCompilerHost.getSourceFile (/home/ciesielskico/app/node_modules/@ngtools/webpack/src/compiler_host.js:209:27)
at findSourceFile (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:45859:29)
at processSourceFile (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:45790:27)
at /home/ciesielskico/app/node_modules/typescript/lib/typescript.js:45901:17
at Object.forEach (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:1115:30)
at processReferencedFiles (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:45899:16)
at findSourceFile (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:45884:21)
at processSourceFile (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:45790:27)
at processRootFile (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:45694:13)
at /home/ciesielskico/app/node_modules/typescript/lib/typescript.js:45151:60
at Object.forEach (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:1115:30)
at Object.createProgram (/home/ciesielskico/app/node_modules/typescript/lib/typescript.js:45151:16)
at AotPlugin._setupOptions (/home/ciesielskico/app/node_modules/@ngtools/webpack/src/plugin.js:111:28)
at new AotPlugin (/home/ciesielskico/app/node_modules/@ngtools/webpack/src/plugin.js:21:14)
at _createAotPlugin (/home/ciesielskico/app/node_modules/@angular/cli/models/webpack-configs/typescript.js:28:12)
at Object.exports.getNonAotConfig (/home/ciesielskico/app/node_modules/@angular/cli/models/webpack-configs/typescript.js:55:13)
at new NgCliWebpackConfig (/home/ciesielskico/app/node_modules/@angular/cli/models/webpack-config.js:24:37)
at Class.run (/home/ciesielskico/app/node_modules/@angular/cli/tasks/serve.js:33:29)
at checkExpressPort.then.then (/home/ciesielskico/app/node_modules/@angular/cli/commands/serve.js:84:26)
at process._tickCallback (internal/process/next_tick.js:103:7)
Mention any other details that might be useful.
package.json
"dependencies": {
"@angular/common": "^2.3.1",
"@angular/compiler": "^2.3.1",
"@angular/core": "^2.3.1",
"@angular/forms": "^2.3.1",
"@angular/http": "^2.3.1",
"@angular/material": "^2.0.0-beta.2",
"@angular/platform-browser": "^2.3.1",
"@angular/platform-browser-dynamic": "^2.3.1",
"@angular/router": "3.1.1",
"@ngrx/core": "^1.2.0",
"@ngrx/effects": "^2.0.0",
"@ngrx/router-store": "^1.2.5",
"@ngrx/store": "^2.2.1",
"bootstrap": "4.0.0-alpha.6",
"chart.js": "^2.5.0",
"core-js": "^2.4.1",
"flag-icon-css": "^2.8.0",
"material-design-icons": "^3.0.1",
"moment": "^2.17.1",
"roboto-fontface": "^0.6.0",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.2"
},
"devDependencies": {
"@angular/cli": "^1.0.0-beta.31",
"@angular/compiler-cli": "^2.3.1",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.42",
"codelyzer": "~2.0.0-beta.1",
"connect-gzip-static": "^1.0.0",
"connect-history-api-fallback": "^1.3.0",
"conventional-github-releaser": "^1.1.3",
"gulp": "^3.9.1",
"gulp-bump": "^2.5.1",
"gulp-clean": "^0.3.2",
"gulp-conventional-changelog": "^1.1.0",
"gulp-git": "^1.12.0",
"gulp-github-release": "^1.2.1",
"gulp-htmlmin": "^3.0.0",
"gulp-string-replace": "^0.3.0",
"gulp-strip-comments": "^2.4.3",
"gulp-typescript": "^3.1.3",
"gulp-util": "^3.0.8",
"http-proxy-middleware": "^0.17.3",
"http-server": "^0.9.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-firefox-launcher": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"karma-safari-launcher": "^1.0.0",
"karma-testingbot-launcher": "^0.1.2",
"lite-server": "^2.2.2",
"ngrx-store-freeze": "^0.1.6",
"ngrx-store-logger": "^0.1.7",
"protractor": "~4.0.13",
"run-sequence": "^1.2.2",
"testingbot-api": "^1.0.1",
"ts-node": "1.2.1",
"tslint": "^4.0.2",
"typescript": "~2.0.3",
"yargs": "^6.6.0",
"yarn": "^0.18.1"
}
After updating to 32 still getting the same error.
My bad, I had been playing with chart,js typings and put a /// <reference path="typings.d.ts" /> which I removed, but forgot to remove this reference.
I got this error when I renamed a environment file with typo.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.