start-angular / SB-Admin-BS4-Angular-8

Simple Dashboard Admin App built using Angular 8 and Bootstrap 4
Other
1.95k stars 1.17k forks source link

unable to run npm run build #111

Closed terrysclaw closed 7 years ago

terrysclaw commented 7 years ago

when i try to run run build caused error.

npm-debug.zip

nkmdev commented 7 years ago

run npm run build command if its failing then try to update @angular/cli and let me know if you are facing any issue.

chrisplusplus commented 7 years ago

Same issue here. I have the latest version of npm and node

nkmdev commented 7 years ago

update @angular/cli version and then try npm run build

chrisplusplus commented 7 years ago

Updated the cli worked for me. For those wondering, the commands are

npm uninstall -g angular-cli @angular/cli

npm cache clean

npm install -g @angular/cli@latest

Midhilaj commented 7 years ago

npm install -g @latest npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name "@latest": Tags may not have any characters that encodeURIComponent encodes.

npm ERR! A complete log of this run can be found in: npm ERR! /home/midhilaj/.npm/_logs/2017-07-29T04_42_27_104Z-debug.log

Midhilaj commented 7 years ago

ng build work for me

alaindeurveilher commented 7 years ago

Seriously @Midhilaj?! Can't you see that @chrisplusplus forgot the package name in the command line?!

The corrected command line is npm install -g @angular/cli@latest

Regards.

terrysclaw commented 7 years ago

update @angular/cli version and then try npm run build

ng build work for me now

arvindsanwaldev commented 7 years ago

I have updated angular-cli with latest version but still unable to build.

Getting Error :

ERROR in Template parse errors: Can't bind to 'up' since it isn't a known property of 'div'. ("

][up]="true" class="d-inline-block">
BenjaminRen commented 7 years ago

@arvindsanwaldev \src\app\layout\bs-component\components\dropdown\dropdown.component.html delete '[up]' in that div

bjakubiak commented 7 years ago

Or even better replace [up]="true" with placement="top-right" which makes dropdown drop up. https://ng-bootstrap.github.io/#/components/dropdown/api

BenjaminRen commented 7 years ago

It's ok with npm start. But when I try npm run build I got error. It's my node npm version: node v8.4.0 npm v5.4.0 angular cli 1.2

I've reinstalled cli, and changed ngbootstrap version, It doesn't work. (new clone without any change,is the warning normal?) show on screen: 11% building modules 9/10 modules 1 active ...S4-Angular-4-demo/src/styles/app.scssWarning: Can't resolve all parameters for NgbModalRef in /home/rendiqi/work/SB-Admin-BS4-Angular-4-demo/node_modules/@ng-bootstrap/ng-bootstrap/modal/modal-ref.d.ts: ([object Object], [object Object], [object Object], ?). This will become an error in Angular v5.x Warning: Can't resolve all parameters for NgbModalRef in /home/rendiqi/work/SB-Admin-BS4-Angular-4-demo/node_modules/@ng-bootstrap/ng-bootstrap/modal/modal-ref.d.ts: ([object Object], [object Object], [object Object], ?). This will become an error in Angular v5.x and then report the error ERROR_ in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/home/rendiqi/work/SB-Admin-BS4-Angular-4-demo/src' @ ./src/main.ts 3:0-74 @ multi ./src/main.ts ERROR in ./src/$$_gendir async Module not found: Error: Can't resolve '/home/rendiqi/work/SB-Admin-BS4-Angular-4-demo/src/$$_gendir/app/layout/layout.module.ngfactory.ts' in '/home/rendiqi/work/SB-Admin-BS4-Angular-4-demo/src/$$_gendir' @ ./src/$$_gendir async @ ./~/_@angular_core@4.3.6@@angular/core/@angular/core.es5.js @ ./src/main.ts @ multi ./src/main.ts ...........

and the log: 2017-09-11T04_57_44_666Z-debug.txt

Updated: It's ok with ng build --dev not ok with ng build --prod

I suppose the problem lay on environment of my server since yours already worked. node version cli version try again

Updated: Now I think it's the problem with cli. I found many guys got same problem with me . And they give some solution for me to try.

akshugharge commented 7 years ago

ng build is working awesome theme thanks