material2-app icon indicating copy to clipboard operation
material2-app copied to clipboard

aot folder missing from repo

Open ghost opened this issue 8 years ago • 5 comments

Getting the following error when building:

ERROR in ./src/main.ts Module not found: Error: Can't resolve './aot/app/app.module.ngfactory' in 'c:\Checkouts\material2-app\src' @ ./src/main.ts 8:0-76 @ multi main

ghost avatar Oct 01 '16 21:10 ghost

https://angular.io/docs/ts/latest/cookbook/aot-compiler.html use below command material2-app-master\node_modules.bin>ngc -p ../../src/tsconfig.json

ysarah avatar Oct 07 '16 08:10 ysarah

If your not using the "AOT" compiler in dev just go into the main.ts and comment out the last three lines

//import {platformBrowser} from '@angular/platform-browser'; //import {MaterialAppModuleNgFactory} from './aot/app/app.module.ngfactory'; //platformBrowser().bootstrapModuleFactory(MaterialAppModuleNgFactory);

and uncomment the three lines above (the module bootstrap lines).
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; import {MaterialAppModule} from './app/app.module'; platformBrowserDynamic().bootstrapModule(MaterialAppModule);

BCusack avatar Oct 16 '16 00:10 BCusack

@BCusack : I have tried it, but it still fire another error:

patterns.map is not a function
TypeError: patterns.map is not a function
    at GlobCopyWebpackPlugin.apply (E:\projects\angular2\material2-app-master\node_modules\angular-cli\plugins\glob-copy-webpack-plugin.js:16:29)
    at Compiler.apply (E:\projects\angular2\material2-app-master\node_modules\tapable\lib\Tapable.js:270:16)
    at WebpackOptionsApply.process (E:\projects\angular2\material2-app-master\node_modules\webpack\lib\WebpackOptionsApply.js:59:18)
    at webpack (E:\projects\angular2\material2-app-master\node_modules\webpack\lib\webpack.js:28:48)
    at Class.run (E:\projects\angular2\material2-app-master\node_modules\angular-cli\tasks\serve-webpack.js:38:27)
    at E:\projects\angular2\material2-app-master\node_modules\angular-cli\commands\serve.js:108:26
    at process._tickCallback (internal/process/next_tick.js:103:7)

n2lose avatar Jan 05 '17 08:01 n2lose

about solving the issue of "patterns.map is not a function" you should look into https://github.com/angular/angular-cli/issues/3566

wnick1 avatar Jan 11 '17 00:01 wnick1

Thank you @BCusack it fixed the issue. I should have seen it earlier

@wnick1 Thanks for the info. I was facing the same issue. Your direction helped to get rid of it.

Newbieee avatar Feb 07 '17 15:02 Newbieee