Quramy / ng2-lazy-load-demo

A sample repository for Angular2 lazy module loading
22 stars 4 forks source link

Invalid Configuration Object, Webpack #5

Closed luisjmrtnz closed 7 years ago

luisjmrtnz commented 7 years ago

Hello Quramy, thanks for this amazing repo. I install this before and it was working perfectly. But recently I wanna to try something differently and now when I install everything and try to run "npm run build" it says `

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

I don't know if it was something to do because of the new version of webpack that it install

I've try to remove the line of webpack.config that says something about NoParse. But then when compiling the code it says another error, a problem with awesome-typescript-loader:

ERROR in ./src/index.ts Module build failed: TypeError: Cannot read property 'exclude' of undefined at applyDefaults (/home/ubuntu/workspace/node_modules/awesome-typescript-loader/src/instance.ts:266:72) at Object.ensureInstance (/home/ubuntu/workspace/node_modules/awesome-typescript-loader/src/instance.ts:145:5) at compiler (/home/ubuntu/workspace/node_modules/awesome-typescript-loader/src/index.ts:37:20) at Object.loader (/home/ubuntu/workspace/node_modules/awesome-typescript-loader/src/index.ts:18:18)

I hope you can help me

dochdl commented 7 years ago

Hi, I had the same error, and found this comment (https://github.com/angular/angular-cli/issues/2234) that says it's indeed the webpack version. I've set the version to v2.1.0-beta.22 and now I get the same error you're getting

ERROR in ./src/index.ts
Module build failed: TypeError: Cannot read property 'exclude' of undefined
    at applyDefaults (C:\Users\6230\lazy-load-demo\ng2-lazy-load-demo-master\nod
e_modules\awesome-typescript-loader\src\instance.ts:266:72)
    at Object.ensureInstance (C:\Users\6230\lazy-load-demo\ng2-lazy-load-demo-ma
ster\node_modules\awesome-typescript-loader\src\instance.ts:145:5)
    at compiler (C:\Users\6230\lazy-load-demo\ng2-lazy-load-demo-master\node_mod
ules\awesome-typescript-loader\src\index.ts:37:20)
    at Object.loader (C:\Users\6230\lazy-load-demo\ng2-lazy-load-demo-master\nod
e_modules\awesome-typescript-loader\src\index.ts:18:18)

ERROR in ./src/index-aot.ts
Module build failed: TypeError: Cannot read property 'exclude' of undefined
    at applyDefaults (C:\Users\6230\lazy-load-demo\ng2-lazy-load-demo-master\nod
e_modules\awesome-typescript-loader\src\instance.ts:266:72)
    at Object.ensureInstance (C:\Users\6230\lazy-load-demo\ng2-lazy-load-demo-ma
ster\node_modules\awesome-typescript-loader\src\instance.ts:145:5)
    at compiler (C:\Users\6230\lazy-load-demo\ng2-lazy-load-demo-master\node_mod
ules\awesome-typescript-loader\src\index.ts:37:20)
    at Object.loader (C:\Users\6230\lazy-load-demo\ng2-lazy-load-demo-master\nod
e_modules\awesome-typescript-loader\src\index.ts:18:18)

Haven't solved it yet either

Yugloocamai commented 7 years ago

Same issue here. Help please?