{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/4408","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/4408/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/4408/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/4408/events","html_url":"https://github.com/angular/angular-cli/issues/4408","id":205212224,"number":4408,"title":"1.0.0-beta.30 - Webpack compile fails.","user":{"login":"JFrankfurt","id":5773490,"avatar_url":"https://avatars.githubusercontent.com/u/5773490?v=3","gravatar_id":"","url":"https://api.github.com/users/JFrankfurt","html_url":"https://github.com/JFrankfurt","followers_url":"https://api.github.com/users/JFrankfurt/followers","following_url":"https://api.github.com/users/JFrankfurt/following{/other_user}","gists_url":"https://api.github.com/users/JFrankfurt/gists{/gist_id}","starred_url":"https://api.github.com/users/JFrankfurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JFrankfurt/subscriptions","organizations_url":"https://api.github.com/users/JFrankfurt/orgs","repos_url":"https://api.github.com/users/JFrankfurt/repos","events_url":"https://api.github.com/users/JFrankfurt/events{/privacy}","received_events_url":"https://api.github.com/users/JFrankfurt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-02-03T16:57:55Z","updated_at":"2017-02-03T20:55:00Z","closed_at":null,"body":"> Please provide us with the following information:\r\n> ---------------------------------------------------------------\r\n\r\n### OS?\r\nWindows 10\r\n\r\n### Versions.\r\n```\r\n@angular/cli: 1.0.0-beta.30\r\nnode: 7.5.0\r\nos: win32 x64\r\n@angular/common: 2.4.6\r\n@angular/compiler: 2.4.6\r\n@angular/core: 2.4.6\r\n@angular/forms: 2.4.6\r\n@angular/http: 2.4.6\r\n@angular/platform-browser: 2.4.6\r\n@angular/platform-browser-dynamic: 2.4.6\r\n@angular/router: 3.4.6\r\n@angular/cli: 1.0.0-beta.30\r\n@angular/compiler-cli: 2.4.6\r\n@ngtools/webpack: 1.2.4 <-- added per other threads\r\n```\r\n\r\n### Repro steps.\r\nng serve works as expected in a new application, but for my current project it only serves the html shell.\r\n\r\n### The log given by the failure.\r\n#### I got these errors in beta.24, but everything still worked as intended, so I didn't think much of it.\r\n```\r\nλ ng serve\r\n** NG Live Development Server is running on http://localhost:4200. **\r\nHash: 55ff5c0649968c95bb51\r\nTime: 14063ms\r\nchunk    {0} polyfills.bundle.js, polyfills.bundle.map (polyfills) 222 kB {4} [initial] [rendered]\r\nchunk    {1} main.bundle.js, main.bundle.map (main) 94.9 kB {3} [initial] [rendered]\r\nchunk    {2} styles.bundle.js, styles.bundle.map (styles) 9.98 kB {4} [initial] [rendered]\r\nchunk    {3} vendor.bundle.js, vendor.bundle.map (vendor) 3.45 MB [initial] [rendered]\r\nchunk    {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]\r\n\r\nERROR in (moduleMetadata.imports || []).filter is not a function\r\nwebpack: Failed to compile.\r\n```\r\n\r\n### Mention any other details that might be useful.\r\npackage.json\r\n```\r\n{\r\n  \"name\": \"search-app\",\r\n  \"version\": \"0.0.0\",\r\n  \"license\": \"MIT\",\r\n  \"angular-cli\": {},\r\n  \"scripts\": {\r\n    \"ng\": \"ng\",\r\n    \"start\": \"ng serve\",\r\n    \"test\": \"ng test\",\r\n    \"pree2e\": \"webdriver-manager update --standalone false --gecko false\",\r\n    \"e2e\": \"protractor\"\r\n  },\r\n  \"private\": true,\r\n  \"dependencies\": {\r\n    \"@angular/common\": \"^2.3.1\",\r\n    \"@angular/compiler\": \"^2.3.1\",\r\n    \"@angular/core\": \"^2.3.1\",\r\n    \"@angular/forms\": \"^2.3.1\",\r\n    \"@angular/http\": \"^2.3.1\",\r\n    \"@angular/platform-browser\": \"^2.3.1\",\r\n    \"@angular/platform-browser-dynamic\": \"^2.3.1\",\r\n    \"@angular/router\": \"^3.3.1\",\r\n    \"core-js\": \"^2.4.1\",\r\n    \"rxjs\": \"^5.0.1\",\r\n    \"ts-helpers\": \"^1.1.1\",\r\n    \"zone.js\": \"^0.7.2\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"@angular/cli\": \"1.0.0-beta.30\",\r\n    \"@angular/compiler-cli\": \"^2.3.1\",\r\n    \"@types/jasmine\": \"2.5.38\",\r\n    \"@types/node\": \"^6.0.42\",\r\n    \"codelyzer\": \"~2.0.0-beta.1\",\r\n    \"jasmine-core\": \"2.5.2\",\r\n    \"jasmine-spec-reporter\": \"2.5.0\",\r\n    \"karma\": \"1.2.0\",\r\n    \"karma-chrome-launcher\": \"^2.0.0\",\r\n    \"karma-cli\": \"^1.0.1\",\r\n    \"karma-jasmine\": \"^1.0.2\",\r\n    \"karma-remap-istanbul\": \"^0.2.1\",\r\n    \"protractor\": \"~4.0.13\",\r\n    \"ts-node\": \"1.2.1\",\r\n    \"tslint\": \"^4.3.0\",\r\n    \"typescript\": \"~2.0.3\"\r\n  }\r\n}\r\n```\r\ntsconfig.json\r\n```\r\n{\r\n  \"compilerOptions\": {\r\n    \"baseUrl\": \"\",\r\n    \"declaration\": false,\r\n    \"emitDecoratorMetadata\": true,\r\n    \"experimentalDecorators\": true,\r\n    \"lib\": [\"es6\", \"dom\"],\r\n    \"mapRoot\": \"./\",\r\n    \"module\": \"es6\",\r\n    \"moduleResolution\": \"node\",\r\n    \"outDir\": \"../dist/out-tsc\",\r\n    \"sourceMap\": true,\r\n    \"target\": \"es5\",\r\n    \"typeRoots\": [\r\n      \"../node_modules/@types\"\r\n    ]\r\n  }\r\n}\r\n```\r\nangular-cli.json\r\n```\r\n{\r\n  \"project\": {\r\n    \"version\": \"1.0.0-beta.30\",\r\n    \"name\": \"search-app\"\r\n  },\r\n  \"apps\": [\r\n    {\r\n      \"root\": \"src\",\r\n      \"outDir\": \"dist\",\r\n      \"assets\": [\r\n        \"assets\",\r\n        \"favicon.ico\"\r\n      ],\r\n      \"index\": \"index.html\",\r\n      \"main\": \"main.ts\",\r\n      \"polyfills\": \"polyfills.ts\",\r\n      \"test\": \"test.ts\",\r\n      \"tsconfig\": \"tsconfig.json\",\r\n      \"prefix\": \"app\",\r\n      \"styles\": [\r\n        \"styles.css\"\r\n      ],\r\n      \"scripts\": [],\r\n      \"environments\": {\r\n        \"source\": \"environments/environment.ts\",\r\n        \"dev\": \"environments/environment.ts\",\r\n        \"prod\": \"environments/environment.prod.ts\"\r\n      }\r\n    }\r\n  ],\r\n  \"e2e\": {\r\n    \"protractor\": {\r\n      \"config\": \"./protractor.conf.js\"\r\n    }\r\n  },\r\n  \"lint\": [\r\n    {\r\n      \"files\": \"src/**/*.ts\",\r\n      \"project\": \"src/tsconfig.json\"\r\n    },\r\n    {\r\n      \"files\": \"e2e/**/*.ts\",\r\n      \"project\": \"e2e/tsconfig.json\"\r\n    }\r\n  ],\r\n  \"test\": {\r\n    \"karma\": {\r\n      \"config\": \"./karma.conf.js\"\r\n    }\r\n  },\r\n  \"defaults\": {\r\n    \"styleExt\": \"css\",\r\n    \"prefixInterfaces\": false,\r\n    \"inline\": {\r\n      \"style\": false,\r\n      \"template\": false\r\n    },\r\n    \"spec\": {\r\n      \"class\": false,\r\n      \"component\": false,\r\n      \"directive\": false,\r\n      \"module\": false,\r\n      \"pipe\": false,\r\n      \"service\": false\r\n    }\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/277359841","html_url":"https://github.com/angular/angular-cli/issues/4408#issuecomment-277359841","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/4408","id":277359841,"user":{"login":"infinitysky","id":1997572,"avatar_url":"https://avatars.githubusercontent.com/u/1997572?v=3","gravatar_id":"","url":"https://api.github.com/users/infinitysky","html_url":"https://github.com/infinitysky","followers_url":"https://api.github.com/users/infinitysky/followers","following_url":"https://api.github.com/users/infinitysky/following{/other_user}","gists_url":"https://api.github.com/users/infinitysky/gists{/gist_id}","starred_url":"https://api.github.com/users/infinitysky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinitysky/subscriptions","organizations_url":"https://api.github.com/users/infinitysky/orgs","repos_url":"https://api.github.com/users/infinitysky/repos","events_url":"https://api.github.com/users/infinitysky/events{/privacy}","received_events_url":"https://api.github.com/users/infinitysky/received_events","type":"User","site_admin":false},"created_at":"2017-02-03T20:55:00Z","updated_at":"2017-02-03T20:55:00Z","body":"Hi, I think I have got similar problem with you\r\n```\r\n@angular/cli: 1.0.0-beta.30\r\nnode: 6.9.5\r\nos: darwin x64\r\n@angular/common: 2.4.6\r\n@angular/compiler: 2.4.6\r\n@angular/core: 2.4.6\r\n@angular/forms: 2.4.6\r\n@angular/http: 2.4.6\r\n@angular/platform-browser: 2.4.6\r\n@angular/platform-browser-dynamic: 2.4.6\r\n@angular/router: 3.4.6\r\n@angular/cli: 1.0.0-beta.30\r\n@angular/compiler-cli: 2.4.6\r\n```\r\n\r\n\r\nand I got the following problems when I try to do `ng serve` with `angular/cli (beta.30)`\r\n\r\n```\r\n\r\nCannot read property 'length' of undefined\r\n\r\nTypeError: Cannot read property 'length' of undefined\r\n\r\n    at createSourceFile (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:8980:109)\r\n\r\n    at parseSourceFileWorker (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:8940:26)\r\n\r\n    at Object.parseSourceFile (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:8899:26)\r\n\r\n    at Object.createSourceFile (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:8727:29)\r\n\r\n    at WebpackCompilerHost.getSourceFile (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/@ngtools/webpack/src/compiler_host.js:293:27)\r\n\r\n    at findSourceFile (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:45859:29)\r\n\r\n    at processSourceFile (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:45790:27)\r\n\r\n    at /Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:45901:17\r\n\r\n    at Object.forEach (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:1115:30)\r\n\r\n    at processReferencedFiles (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:45899:16)\r\n\r\n    at findSourceFile (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:45884:21)\r\n\r\n    at processSourceFile (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:45790:27)\r\n\r\n    at processRootFile (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:45694:13)\r\n\r\n    at /Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:45151:60\r\n\r\n    at Object.forEach (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:1115:30)\r\n\r\n    at Object.createProgram (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/typescript/lib/typescript.js:45151:16)\r\n\r\n    at AotPlugin._setupOptions (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/@ngtools/webpack/src/plugin.js:161:28)\r\n\r\n    at new AotPlugin (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/@ngtools/webpack/src/plugin.js:21:14)\r\n\r\n    at Object.exports.getNonAotConfig (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/@angular/cli/models/webpack-configs/typescript.js:26:13)\r\n\r\n    at new NgCliWebpackConfig (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/@angular/cli/models/webpack-config.js:24:37)\r\n\r\n    at Class.run (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/@angular/cli/tasks/build.js:16:29)\r\n\r\n    at Class.buildRun (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/@angular/cli/commands/build.run.js:12:22)\r\n\r\n    at Class.run (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/@angular/cli/commands/build.js:40:47)\r\n\r\n    at Class.<anonymous> (/Users/xxxxxx-dev/MyDev/linkfornew/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)\r\n\r\n    at process._tickCallback (internal/process/next_tick.js:103:7)\r\n\r\n\r\n\r\n```\r\n\r\n\r\n\"ng serve\" ---> Error.\r\n\"ng build\" ---> Error.\r\n\r\n\r\nI have tried the advice, which is installing webpack@1.2.4 \"npm install @ngtools/webpack@1.2.4 --save\". After I installed the webpack@1.2.4 the problem gone.\r\n\r\n\r\n"}}
{"actor":{"display_login":"infinitysky"}}