creativetimofficial / ct-material-dashboard-pro-angular

68 stars 35 forks source link

ng serve does not work #203

Closed ahevia2014 closed 6 years ago

ahevia2014 commented 6 years ago

when i execute ng serve -o for "material-dashboard-pro-angular" I'm getting following errors:

$ ng serve -o NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ Cannot read property 'thisCompilation' of undefined TypeError: Cannot read property 'thisCompilation' of undefined at NodeTemplatePlugin.apply (C:\Users\eandhev\Desktop\ionic3\dispatcher2\nod e_modules\webpack\lib\node\NodeTemplatePlugin.js:19:18) at Compiler.apply (C:\Users\eandhev\Desktop\ionic3\dispatcher2\nodemodules\ tapable\lib\Tapable.js:375:16) at Object.compileTemplate (C:\Users\eandhev\Desktop\ionic3\dispatcher2\node modules\html-webpack-plugin\lib\compiler.js:48:17) at Compiler. (C:\Users\eandhev\Desktop\ionic3\dispatcher2\node_mo dules\html-webpack-plugin\index.js:47:40) at Compiler.applyPluginsParallel (C:\Users\eandhev\Desktop\ionic3\dispatcher 2\node_modules\tapable\lib\Tapable.js:293:14) at applyPluginsAsync.err (C:\Users\eandhev\Desktop\ionic3\dispatcher2\node_m odules\@angular\cli\node_modules\webpack\lib\Compiler.js:499:9) at Compiler.applyPluginsAsyncSeries (C:\Users\eandhev\Desktop\ionic3\dispatc her2\node_modules\tapable\lib\Tapable.js:195:46) at Compiler.compile (C:\Users\eandhev\Desktop\ionic3\dispatcher2\node_module s\@angular\cli\node_modules\webpack\lib\Compiler.js:492:8) at compiler.applyPluginsAsync.err (C:\Users\eandhev\Desktop\ionic3\dispatche r2\node_modules\@angular\cli\node_modules\webpack\lib\Compiler.js:83:18) at next (C:\Users\eandhev\Desktop\ionic3\dispatcher2\node_modules\tapable\li b\Tapable.js:202:11) at Compiler.compilerInvalid (C:\Users\eandhev\Desktop\ionic3\dispatcher2\nod e_modules\webpack-dev-middleware\lib\Shared.js:161:5) at next (C:\Users\eandhev\Desktop\ionic3\dispatcher2\node_modules\tapable\li b\Tapable.js:204:14) at Compiler.compiler.plugin (C:\Users\eandhev\Desktop\ionic3\dispatcher2\nod e_modules\@angular\cli\node_modules\webpack\lib\CachePlugin.js:48:5) at next (C:\Users\eandhev\Desktop\ionic3\dispatcher2\node_modules\tapable\li b\Tapable.js:204:14) at Compiler.compiler.plugin (C:\Users\eandhev\Desktop\ionic3\dispatcher2\nod e_modules\@ngtools\webpack\src\angular_compiler_plugin.js:462:13) at Compiler.applyPluginsAsyncSeries (C:\Users\eandhev\Desktop\ionic3\dispatc her2\node_modules\tapable\lib\Tapable.js:206:13) Environment Angular CLI: 1.7.2 Node: 8.9.3 OS: win32 x64 Angular: 5.2.0 ... animations, common, compiler, compiler-cli, core, forms ... http, platform-browser, platform-browser-dynamic ... platform-server, router

@angular/cdk: 5.0.4 @angular/cli: 1.7.2 @angular/material: 5.0.4 @angular-devkit/build-optimizer: 0.3.2 @angular-devkit/core: 0.3.2 @angular-devkit/schematics: 0.3.2 @ngtools/json-schema: 1.2.0 @ngtools/webpack: 1.10.1 @schematics/angular: 0.3.2 @schematics/package-update: 0.3.2 typescript: 2.6.2 webpack: 4.1.1

$ npm -v 5.6.0

as a additional comment, I dont have any problem to serve the free (example) version of the same template. Tks

Andrés

chelaruc commented 6 years ago

@ahevia2014 Thank you for using our product! I don't get this error when I'm running ng serve -o. Can you tell me the steps to reproduce it?

Best, Ciprian

mdwe commented 6 years ago

I have the same problem.

Cannot read property 'thisCompilation' of undefined

This means that problem is with webpack. Try reinstall webpack to version 3.11.0 by adding webpack to package.json.

After this try I have error:

10% building modules 3/3 modules 0 active(node:2037) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Exited with code 3 (node:2037) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 19% building modules 79/93 modules 14 active ...e/node_modules/html-entities/index.jsError: No module factory available for dependency type: ContextElementDependency at Compilation.addModuleDependencies (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:215:21) at Compilation.processModuleDependencies (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:204:8) at _this.buildModule.err (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:357:14) at building.forEach.cb (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:149:27) at Array.forEach (<anonymous>) at callback (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:149:13) at module.build (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:176:11) at resolveDependencies (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/ContextModule.js:165:4) at ContextModule.result.resolveDependencies (/var/www/gui_template/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:450:25) at ContextModule.build (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/ContextModule.js:105:8) at Compilation.buildModule (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:151:10) at factoryCallback (/var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:342:12) at /var/www/gui_template/node_modules/@angular/cli/node_modules/webpack/lib/ContextModuleFactory.js:95:13 at /var/www/gui_template/node_modules/tapable/lib/Tapable.js:268:11 at done.then (/var/www/gui_template/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:452:28) at <anonymous> 69% building modules 493/493 modules 0 active

@chelaruc what's your version of Webpack?

chelaruc commented 6 years ago

@mdwe we are not using webpack

ShabnamPaidarfard commented 5 years ago

I have the same problem:

ERROR in ./src/assets/scss/material-dashboard.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/assets/scss/material-dashboard.scss) Module build failed: Error: Cannot find module 'node-sass' Require stack: