PatrickJS / PatrickJS-starter

MFE Starter
MIT License
10.33k stars 4.89k forks source link

Bug report on current build #1249

Closed Bengreen closed 7 years ago

Bengreen commented 7 years ago

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

Then when I run npm start I get errors:

npm start

> angular2-webpack-starter@5.1.1 start /Users/bengreene/development/temp/angular2-webpack-starter
> npm run server:dev

> angular2-webpack-starter@5.1.1 server:dev /Users/bengreene/development/temp/angular2-webpack-starter
> webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/

 10% building modules 3/3 modules 0 active                
Project is running at http://localhost:3000/
webpack output is served from /
Content not from webpack is served from /Users/bengreene/development/temp/angular2-webpack-starter/src
404s will fallback to /index.html
 10% building modules 4/8 modules 4 active ...s/webpack-dev-server/client/socket.jsTypeError: Cannot read property 'exclude' of undefined
    at applyDefaults (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:266:72)
    at Object.ensureInstance (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:145:5)
    at compiler (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:37:20)
    at Object.loader (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:18:18)
    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)
    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3
    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)
    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular2-template-loader/index.js:32:10)
    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)
    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3
    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)
    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular-router-loader/src/index.js:81:10)
    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:197:4 'TypeError: Cannot read property \'exclude\' of undefined\n    at applyDefaults (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:266:72)\n    at Object.ensureInstance (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:145:5)\n    at compiler (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:37:20)\n    at Object.loader (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:18:18)\n    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)\n    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)\n    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3\n    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)\n    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular2-template-loader/index.js:32:10)\n    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)\n    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)\n    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3\n    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)\n    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular-router-loader/src/index.js:81:10)\n    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)\n    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)\n    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:197:4'
 10% building modules 5/8 modules 3 active ...s/webpack-dev-server/client/socket.jsTypeError: Cannot read property 'exclude' of undefined
    at applyDefaults (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:266:72)
    at Object.ensureInstance (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:145:5)
    at compiler (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:37:20)
    at Object.loader (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:18:18)
    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)
    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3
    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)
    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular2-template-loader/index.js:32:10)
    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)
    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3
    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)
    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular-router-loader/src/index.js:81:10)
    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:197:4 'TypeError: Cannot read property \'exclude\' of undefined\n    at applyDefaults (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:266:72)\n    at Object.ensureInstance (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:145:5)\n    at compiler (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:37:20)\n    at Object.loader (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:18:18)\n    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)\n    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)\n    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3\n    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)\n    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular2-template-loader/index.js:32:10)\n    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)\n    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)\n    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3\n    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)\n    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular-router-loader/src/index.js:81:10)\n    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)\n    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)\n    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:197:4'
 10% building modules 6/9 modules 3 active ...bpack-starter/node_modules/url/url.jsTypeError: Cannot read property 'exclude' of undefined
    at applyDefaults (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:266:72)
    at Object.ensureInstance (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:145:5)
    at compiler (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:37:20)
    at Object.loader (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:18:18)
    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)
    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3
    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)
    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular2-template-loader/index.js:32:10)
    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)
    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3
    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)
    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular-router-loader/src/index.js:81:10)
    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:197:4 'TypeError: Cannot read property \'exclude\' of undefined\n    at applyDefaults (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:266:72)\n    at Object.ensureInstance (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:145:5)\n    at compiler (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:37:20)\n    at Object.loader (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:18:18)\n    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)\n    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)\n    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3\n    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)\n    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular2-template-loader/index.js:32:10)\n    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)\n    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:213:10)\n    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:228:3\n    at Object.context.callback (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:106:13)\n    at Object.module.exports (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/angular-router-loader/src/index.js:81:10)\n    at LOADER_EXECUTION (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:114:14)\n    at runSyncOrAsync (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:115:4)\n    at iterateNormalLoaders (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:224:2)\n    at /Users/bengreene/development/temp/angular2-webpack-starter/node_modules/loader-runner/lib/LoaderRunner.js:197:4'
1188ms building modules

AND

ERROR in ./src/polyfills.browser.ts
Module build failed: TypeError: Cannot read property 'exclude' of undefined
    at applyDefaults (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:266:72)
    at Object.ensureInstance (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:145:5)
    at compiler (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:37:20)
    at Object.loader (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:18:18)
 @ multi polyfills

ERROR in ./src/main.browser.ts
Module build failed: TypeError: Cannot read property 'exclude' of undefined
    at applyDefaults (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:266:72)
    at Object.ensureInstance (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:145:5)
    at compiler (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:37:20)
    at Object.loader (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:18:18)
 @ multi main

ERROR in ./src/vendor.browser.ts
Module build failed: TypeError: Cannot read property 'exclude' of undefined
    at applyDefaults (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:266:72)
    at Object.ensureInstance (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/instance.ts:145:5)
    at compiler (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:37:20)
    at Object.loader (/Users/bengreene/development/temp/angular2-webpack-starter/node_modules/awesome-typescript-loader/src/index.ts:18:18)
 @ multi vendor

I am building on OSX with npm: 3.10.9 and node 7.2.1

eimranashraf commented 7 years ago

I am having the same issue. I have tried it with node version 7.2.1 ,6.9 and 6.3.1.

RayLuxembourg commented 7 years ago

Same issue . node version 6.9.1 , npm version 4.0.3

bonaventoora commented 7 years ago

Seems like it is not a problem with webpack-starter but with ts 2.1.4. Relevant issue on awesome-typescript-loader repo

trsh commented 7 years ago

This boilerplate seems to work with pinned 2.1.1 v typescript

joshwiens commented 7 years ago

TypeScript is pinned in master to the latest working version. Keeping this issue open until we can pick up a 2.1.4 compliant version of awesome-typescript-loader

kheiligh commented 7 years ago

After googling this for a bit, I found this: https://github.com/s-panferov/awesome-typescript-loader/issues/190 - for me, clearing cache and changing package.json's typescript dependency from "^2.0.6" to "2.0.10" worked. The app builds and runs now.

AKlaus commented 7 years ago

In addition to @d3viant0ne 's commit of 9-Dec, I had to set "@angular/forms": "2.2.1" (use to be ^2.2.1, which brought me v2.3.0). As I forked angular2-webpack-starter before that commit of 23-Nov, it was ^2.2.1 just for the @angular/forms.

So my full fix was:

  1. Modified package.json to set:
  1. Deleted corresponding folders in node_modules and ran npm install. For some reason, running npm install straight away didn't work (something was cached?).
dannypule commented 7 years ago

Can confirm, modifiying my package.json to "typescript": "2.1.1" resolved the issue. I'm using "awesome-typescript-loader": "2.2.4" for my angular 2.3.0 project.

After modifying the package.json, I deleted the node_modules folder then ran npm cache clean and finally npm install. All is working fine now.

kolkov commented 7 years ago

@dannypule and the same for me:

Html Webpack Plugin:
  Error: Child compilation failed:
  Entry module not found: Error: Can't resolve 'D:\' in 'D:\!Projects\TypeScript  \test\angular2-webpack-2':
  Error: Can't resolve 'D:\' in 'D:\!Projects\TypeScript\test\angular2-webpack-2  '

  - compiler.js:76 
    [angular2-webpack-2]/[html-webpack-plugin]/lib/compiler.js:76:16

  - Compiler.js:282 Compiler.
    [angular2-webpack-2]/[webpack]/lib/Compiler.js:282:10

  - Compiler.js:479 
    [angular2-webpack-2]/[webpack]/lib/Compiler.js:479:13

  - Tapable.js:102 next
    [angular2-webpack-2]/[tapable]/lib/Tapable.js:102:11

  - CachePlugin.js:61 Compiler.
    [angular2-webpack-2]/[webpack]/lib/CachePlugin.js:61:4

  - Tapable.js:106 Compiler.applyPluginsAsyncSeries
    [angular2-webpack-2]/[tapable]/lib/Tapable.js:106:13

  - Compiler.js:476 
    [angular2-webpack-2]/[webpack]/lib/Compiler.js:476:10

  - Tapable.js:95 Compilation.applyPluginsAsyncSeries
    [angular2-webpack-2]/[tapable]/lib/Tapable.js:95:46

  - Compilation.js:627 
    [angular2-webpack-2]/[webpack]/lib/Compilation.js:627:18

  - Tapable.js:95 Compilation.applyPluginsAsyncSeries
    [angular2-webpack-2]/[tapable]/lib/Tapable.js:95:46

  - Compilation.js:618 
    [angular2-webpack-2]/[webpack]/lib/Compilation.js:618:10

  - Tapable.js:95 Compilation.applyPluginsAsyncSeries
    [angular2-webpack-2]/[tapable]/lib/Tapable.js:95:46

  - Compilation.js:613 
    [angular2-webpack-2]/[webpack]/lib/Compilation.js:613:9

  - Tapable.js:95 Compilation.applyPluginsAsyncSeries
    [angular2-webpack-2]/[tapable]/lib/Tapable.js:95:46

  - Compilation.js:609 
    [angular2-webpack-2]/[webpack]/lib/Compilation.js:609:8

  - Tapable.js:95 Compilation.applyPluginsAsyncSeries
    [angular2-webpack-2]/[tapable]/lib/Tapable.js:95:46

  - Compilation.js:555 Compilation.seal
    [angular2-webpack-2]/[webpack]/lib/Compilation.js:555:7

  - Compiler.js:473 
    [angular2-webpack-2]/[webpack]/lib/Compiler.js:473:16

  - Tapable.js:189 
    [angular2-webpack-2]/[tapable]/lib/Tapable.js:189:11

  - Compilation.js:452 Compilation.
    [angular2-webpack-2]/[webpack]/lib/Compilation.js:452:10

  - Compilation.js:347 Compilation.errorAndCallback
    [angular2-webpack-2]/[webpack]/lib/Compilation.js:347:3

  - Compilation.js:364 Compilation.
    [angular2-webpack-2]/[webpack]/lib/Compilation.js:364:11
PCASME commented 7 years ago

+1

package.json

...
"dependencies": {
    "@angular/common": "^2.2.4",
    "@angular/compiler": "^2.2.4",
    "@angular/compiler-cli": "^2.2.4",
    "@angular/core": "^2.2.4",
    "@angular/platform-browser": "^2.2.4",
    "@angular/platform-browser-dynamic": "^2.2.4",
    "@angular/platform-server": "^2.2.4",
    "core-js": "^2.4.1",
    "es6-promise": "^4.0.5",
    "es6-shim": "^0.35.2",
    "materialize-css": "^0.97.8",
    "reflect-metadata": "^0.1.8",
    "rxjs": "5.0.0-rc.4",
    "zone.js": "^0.7.2"
  },
  "devDependencies": {
    "@types/electron": "^1.3.20",
    "@types/hammerjs": "^2.0.33",
    "@types/jasmine": "^2.2.34",
    "@types/lodash": "0.0.28",
    "@types/node": "^6.0.38",
    "@types/source-map": "^0.1.27",
    "@types/uglify-js": "^2.0.27",
    "@types/webpack": "2.0.0",
    "angular2-template-loader": "^0.6.0",
    "awesome-typescript-loader": "^2.2.4",
    "clean-webpack-plugin": "^0.1.14",
    "copy-webpack-plugin": "^4.0.1",
    "css-loader": "^0.26.1",
    "extract-text-webpack-plugin": "^2.0.0-beta.4",
    "file-loader": "^0.9.0",
    "html-webpack-plugin": "^2.24.1",
    "imports-loader": "^0.6.5",
    "jasmine-core": "^2.4.1",
    "json-loader": "^0.5.4",
    "node-sass": "^3.13.0",
    "raw-loader": "^0.5.1",
    "rimraf": "^2.5.4",
    "sass-loader": "^4.0.2",
    "style-loader": "^0.13.1",
    "ts-helpers": "^1.1.2",
    "ts-loader": "^1.2.2",
    "tslint": "^4.0.2",
    "tslint-loader": "^3.3.0",
    "typescript": "2.1.1",
    "url-loader": "^0.5.7",
    "webpack": "^2.1.0-beta.28",
    "webpack-dev-server": "^2.1.0-beta.12",
    "webpack-md5-hash": "^0.0.5",
    "webpack-merge": "^1.0.2"
  }
}

Error log when compiling:

ERROR in ./~/css-loader!./~/sass-loader!./src/app/scripts/main.browser.ts
Module build failed: 
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
        ^
      Property "platformBrowserDynamic" must be followed by a ':'
      in /Users/pcasme/repos/ng2-test/src/app/scripts/main.browser.ts (line 6, column 10)
 @ ./src/app/scripts/main.browser.ts 4:14-133

ERROR in ./~/css-loader!./~/sass-loader!./~/timers-browserify/main.js
Module build failed: 
var apply = Function.prototype.apply;
^
      Invalid CSS after "v": expected 1 selector or at-rule, was "var apply = Functio"
      in /Users/pcasme/repos/ng2-test/node_modules/timers-browserify/main.js (line 1, column 1)
 @ ./~/timers-browserify/main.js 4:14-87
 @ ./~/rxjs/util/Immediate.js
 @ ./~/rxjs/scheduler/AsapAction.js
 @ ./~/rxjs/scheduler/asap.js
 @ ./~/rxjs/Rx.js
 @ ./src/app/scripts/vendor.browser.ts

ERROR in ./~/timers-browserify/main.js
Module build failed: Error
    at /Users/pcasme/repos/ng2-test/node_modules/webpack/lib/NormalModule.js:143:35
    at /Users/pcasme/repos/ng2-test/node_modules/loader-runner/lib/LoaderRunner.js:359:11
    at /Users/pcasme/repos/ng2-test/node_modules/loader-runner/lib/LoaderRunner.js:225:18
    at context.callback (/Users/pcasme/repos/ng2-test/node_modules/loader-runner/lib/LoaderRunner.js:106:13)
    at Object.onRender (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/index.js:273:13)
    at Object.<anonymous> (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/node_modules/async/dist/async.js:2234:31)
    at apply (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/node_modules/async/dist/async.js:20:25)
    at Object.<anonymous> (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/node_modules/async/dist/async.js:56:12)
    at Object.callback (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/node_modules/async/dist/async.js:840:16)
    at options.error (/Users/pcasme/repos/ng2-test/node_modules/node-sass/lib/index.js:289:32)

ERROR in /Users/pcasme/repos/ng2-test/node_modules/extract-text-webpack-plugin/loader.js?{"id":1,"omit":1,"remove":true}!/Users/pcasme/repos/ng2-test/node_modules/style-loader/index.js!/Users/pcasme/repos/ng2-test/node_modules/css-loader/index.js!/Users/pcasme/repos/ng2-test/node_modules/sass-loader/index.js!/Users/pcasme/repos/ng2-test/node_modules/timers-browserify/main.js doesn't export content

ERROR in ./src/app/scripts/main.browser.ts
Module build failed: Error
    at /Users/pcasme/repos/ng2-test/node_modules/webpack/lib/NormalModule.js:143:35
    at /Users/pcasme/repos/ng2-test/node_modules/loader-runner/lib/LoaderRunner.js:359:11
    at /Users/pcasme/repos/ng2-test/node_modules/loader-runner/lib/LoaderRunner.js:225:18
    at context.callback (/Users/pcasme/repos/ng2-test/node_modules/loader-runner/lib/LoaderRunner.js:106:13)
    at Object.onRender (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/index.js:273:13)
    at Object.<anonymous> (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/node_modules/async/dist/async.js:2234:31)
    at apply (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/node_modules/async/dist/async.js:20:25)
    at Object.<anonymous> (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/node_modules/async/dist/async.js:56:12)
    at Object.callback (/Users/pcasme/repos/ng2-test/node_modules/sass-loader/node_modules/async/dist/async.js:840:16)
    at options.error (/Users/pcasme/repos/ng2-test/node_modules/node-sass/lib/index.js:289:32)

ERROR in /Users/pcasme/repos/ng2-test/node_modules/awesome-typescript-loader/dist/entry.js!/Users/pcasme/repos/ng2-test/node_modules/angular2-template-loader/index.js!/Users/pcasme/repos/ng2-test/node_modules/extract-text-webpack-plugin/loader.js?{"id":1,"omit":1,"remove":true}!/Users/pcasme/repos/ng2-test/node_modules/style-loader/index.js!/Users/pcasme/repos/ng2-test/node_modules/css-loader/index.js!/Users/pcasme/repos/ng2-test/node_modules/sass-loader/index.js!/Users/pcasme/repos/ng2-test/src/app/scripts/main.browser.ts doesn't export content

ERROR in [default] /Users/pcasme/repos/ng2-test/src/app/scripts/main.browser.ts:10:10 
Property 'hot' does not exist on type 'NodeModule'.

ERROR in [default] /Users/pcasme/repos/ng2-test/src/app/scripts/main.browser.ts:13:9 
Property 'hot' does not exist on type 'NodeModule'.

ERROR in [default] /Users/pcasme/repos/ng2-test/src/app/scripts/main.browser.ts:20:8 
Property 'hot' does not exist on type 'NodeModule'.
Child html-webpack-plugin for "index.html":
       [0] ./~/html-webpack-plugin/lib/loader.js!./src/app/index.html 534 bytes {0} [built]
Child extract-text-webpack-plugin:
        + 1 hidden modules

    ERROR in ./~/css-loader!./~/sass-loader!./~/timers-browserify/main.js
    Module build failed: 
    var apply = Function.prototype.apply;
    ^
          Invalid CSS after "v": expected 1 selector or at-rule, was "var apply = Functio"
          in /Users/pcasme/repos/ng2-test/node_modules/timers-browserify/main.js (line 1, column 1)
Child extract-text-webpack-plugin:
       [0] ./~/css-loader!./~/sass-loader!./src/app/scripts/main.browser.ts 289 bytes {0} [built] [failed] [1 error]

    ERROR in ./~/css-loader!./~/sass-loader!./src/app/scripts/main.browser.ts
    Module build failed: 
    import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
            ^
          Property "platformBrowserDynamic" must be followed by a ':'
          in /Users/pcasme/repos/ng2-test/src/app/scripts/main.browser.ts (line 6, column 10)
kolkov commented 7 years ago

I have found what causes this problem in my case: If I understand correctly, they filter out the character ! from path, but ! is legal character in Windows path. https://github.com/angular/angular-cli/issues/3529#issuecomment-266737336

ghost commented 7 years ago

Pinning typescript to v2.1.1 in package.json worked for me too. Thanks.

hoektoe commented 7 years ago

So started with ng-book2 for Angular and cannot even do the App Works! because of this stuff

danbachar commented 7 years ago

Pinning typescript to v2.1.1 didn't help me. My error is as following:

Module not found: Error: Can't resolve 'C:\' in 'C:\Users\Dan\Desktop\angular2-webpack-starter-master'

my package.json:

{
  "name": "angular2-webpack-starter",
  "version": "5.1.1",
  "description": "An Angular 2 Webpack Starter kit featuring Angular 2 (Router, Http, Forms, Services, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, TypeScript, and Webpack by AngularClass",
  "keywords": [
    "angular2",
    "webpack",
    "typescript"
  ],
  "author": "Patrick Stapleton <patrick@angularclass.com>",
  "homepage": "https://github.com/angularclass/angular2-webpack-starter",
  "license": "MIT",
  "scripts": {
    "build:aot:prod": "npm run clean:dist && npm run clean:aot && npm run ngc -- --webpack config/webpack.prod.js && webpack --config config/webpack.prod.js  --progress --profile --bail",
    "build:aot": "npm run build:aot:prod",
    "build:dev": "npm run clean:dist && webpack --config config/webpack.dev.js --progress --profile",
    "build:docker": "npm run build:prod && docker build -t angular2-webpack-start:latest .",
    "build:prod": "npm run clean:dist && webpack --config config/webpack.prod.js  --progress --profile --bail",
    "build": "npm run build:dev",
    "ci:aot": "npm run lint && npm run test && npm run build:aot && npm run e2e",
    "ci:jit": "npm run lint && npm run test && npm run build:prod && npm run e2e",
    "ci:nobuild": "npm run lint && npm test && npm run e2e",
    "ci:testall": "npm run lint && npm run test && npm run build:prod && npm run e2e && npm run build:aot && npm run e2e",
    "ci": "npm run ci:testall",
    "clean:aot": "npm run rimraf -- compiled",
    "clean:dist": "npm run rimraf -- dist",
    "clean:install": "npm set progress=false && npm install",
    "clean:start": "npm start",
    "clean": "npm cache clean && npm run rimraf -- node_modules doc coverage dist compiled",
    "docker": "docker",
    "docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/",
    "e2e:live": "npm run e2e -- --elementExplorer",
    "e2e": "npm-run-all -p -r server:prod:ci e2e:only",
    "e2e:only": "npm run protractor",
    "github-deploy:dev": "webpack --config config/webpack.github-deploy.js --progress --profile --env.githubDev",
    "github-deploy:prod": "webpack --config config/webpack.github-deploy.js --progress --profile --env.githubProd",
    "github-deploy": "npm run github-deploy:dev",
    "lint": "npm run tslint \"src/**/*.ts\"",
    "ngc": "./node_modules/.bin/ngc-w -p tsconfig.webpack.json",
    "postversion": "git push && git push --tags",
    "prebuild:dev": "npm run clean:dist",
    "prebuild:prod": "npm run clean:dist",
    "preclean:install": "npm run clean",
    "preclean:start": "npm run clean",
    "pree2e": "npm run webdriver:update -- --standalone",
    "preversion": "npm test",
    "protractor": "protractor",
    "rimraf": "rimraf",
    "server:dev:hmr": "npm run server:dev -- --inline --hot",
    "server:dev": "webpack-dev-server --config config/webpack.dev.js --progress --profile --open --watch --content-base src /",
    "server:prod": "http-server dist -c-1 --cors",
    "server:prod:ci": "http-server dist -p 3000 -c-1 --cors",
    "server": "npm run server:dev",
    "start:hmr": "npm run server:dev:hmr",
    "start": "npm run server:dev",
    "test": "karma start",
    "tslint": "tslint",
    "typedoc": "typedoc",
    "version": "npm run build",
    "watch:dev:hmr": "npm run watch:dev -- --hot",
    "watch:dev": "npm run build:dev -- --watch",
    "watch:prod": "npm run build:prod -- --watch",
    "watch:test": "npm run test -- --auto-watch --no-single-run",
    "watch": "npm run watch:dev",
    "webdriver-manager": "webdriver-manager",
    "webdriver:start": "npm run webdriver-manager start",
    "webdriver:update": "npm run webdriver-manager update",
    "webpack-dev-server": "webpack-dev-server",
    "webpack": "webpack"
  },
  "dependencies": {
    "@angular/common": "~2.4.1",
    "@angular/compiler": "~2.4.1",
    "@angular/core": "~2.4.1",
    "@angular/forms": "~2.4.1",
    "@angular/http": "~2.4.1",
    "@angular/platform-browser": "~2.4.1",
    "@angular/platform-browser-dynamic": "~2.4.1",
    "@angular/platform-server": "~2.4.1",
    "@angular/router": "~3.4.1",
    "@angularclass/conventions-loader": "^1.0.2",
    "@angularclass/hmr": "~1.2.2",
    "@angularclass/hmr-loader": "~3.0.2",
    "assets-webpack-plugin": "^3.4.0",
    "core-js": "^2.4.1",
    "http-server": "^0.9.0",
    "ie-shim": "^0.1.0",
    "reflect-metadata": "^0.1.9",
    "rxjs": "~5.0.2",
    "zone.js": "~0.7.4"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~2.4.1",
    "@types/hammerjs": "^2.0.33",
    "@types/jasmine": "^2.2.34",
    "@types/node": "^6.0.38",
    "@types/selenium-webdriver": "2.53.33",
    "@types/source-map": "^0.1.27",
    "@types/uglify-js": "^2.0.27",
    "@types/webpack": "^2.0.0",
    "angular-router-loader": "^0.4.0",
    "angular2-template-loader": "^0.6.0",
    "awesome-typescript-loader": "~3.0.0-beta.17",
    "codelyzer": "~1.0.0-beta.4",
    "copy-webpack-plugin": "^4.0.0",
    "css-loader": "^0.26.0",
    "exports-loader": "^0.6.3",
    "expose-loader": "^0.7.1",
    "file-loader": "^0.9.0",
    "gh-pages": "^0.12.0",
    "html-webpack-plugin": "^2.21.0",
    "imports-loader": "^0.6.5",
    "istanbul-instrumenter-loader": "0.2.0",
    "json-loader": "^0.5.4",
    "karma": "^1.2.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-coverage": "^1.1.1",
    "karma-jasmine": "^1.0.2",
    "karma-mocha-reporter": "^2.0.0",
    "karma-remap-coverage": "^0.1.1",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-webpack": "1.8.0",
    "ngc-webpack": "^1.0.2",
    "npm-run-all": "^3.1.2",
    "parse5": "^2.2.2",
    "protractor": "^4.0.10",
    "raw-loader": "0.5.1",
    "rimraf": "~2.5.4",
    "script-ext-html-webpack-plugin": "^1.3.2",
    "source-map-loader": "^0.1.5",
    "string-replace-loader": "1.0.5",
    "style-loader": "^0.13.1",
    "to-string-loader": "^1.1.4",
    "ts-helpers": "1.1.2",
    "ts-node": "^1.7.0",
    "tslint": "~3.15.1",
    "tslint-loader": "^2.1.5",
    "typedoc": "^0.5.0",
    "typescript": "2.1.1",
    "url-loader": "^0.5.7",
    "v8-lazy-parse-webpack-plugin": "^0.3.0",
    "webpack": "2.2.0-rc.2",
    "webpack-dev-middleware": "^1.6.1",
    "webpack-dev-server": "2.2.0-rc.0",
    "webpack-md5-hash": "^0.0.5",
    "webpack-merge": "~1.0.1"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/angularclass/angular2-webpack-starter.git"
  },
  "bugs": {
    "url": "https://github.com/angularclass/angular2-webpack-starter/issues"
  },
  "engines": {
    "node": ">= 4.2.1",
    "npm": ">= 3"
  }
}    

Versions:

npm -v: 3.10.8
node -v: 6.7.0
laguiz commented 7 years ago

It worked for me by pinning typescript to 2.1.1 in package.json with node 5.6.0 and npm 3.6.0.

havart commented 7 years ago

change typescript version to 2.1.1 or 2.0.10 in package.json. It worked for me node 6.9.4 and npm 4.0.5