jonsamwell / angular-simple-shopping-cart

A simple shopping cart built with Angular 4 and RXJS
69 stars 74 forks source link

fails on the build #2

Open tiedyejedi opened 6 years ago

tiedyejedi commented 6 years ago

ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\Web\simpleCart\src' @ ./src/main.ts 4:0-74 @ multi ./src/main.ts npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! angular-simple-shopping-cart@1.0.0 build: ng build -prod -aot && gulp npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the angular-simple-shopping-cart@1.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

shahbits22 commented 6 years ago

I was facing the same issue. Update zone.js to ^0.8.14 and @angular/cli to 1.2.4. It worked for me. Also, remove node_moduels and package.lock before running npm install again.

tiedyejedi commented 6 years ago

Thanks shahbits22! Not sure what you meant by "and to 1.2.4". I just changed it to ^0.8.14 and it works now.

Anyone reading this and haven't installed it should open the package.json file and change the zone.js setting to ^0.8.14 and then install it.

Shashidanand commented 6 years ago

I am having identical issue while executing node run build and in package.json file version of zone.js is already ^0.8.14 ( "zone.js": "^0.8.14"). Still having same issue. Below screenshot for reference - image

tiedyejedi commented 6 years ago

I had deleted the whole folder and unzipped the the downloaded file all over again. I changed the zone.js setting, then re-installed and it works. Here it is in action: https://c5.bandgrid.com/

Click the Store tab and you'll see a modified version of this shopping cart. I added Categories and shipping costs.