udos86 / ng-dynamic-forms

Rapid form development library for Angular
ISC License
1.32k stars 368 forks source link

Angular CLI - Prod Build Issue #668

Closed TheMagnificent11 closed 6 years ago

TheMagnificent11 commented 6 years ago

I'm submitting a


[x] Bug / Regression
[ ] Feature Request / Proposal
[ ] Question

I'm using


NG Dynamic Forms Version: `X.Y.Z`

[ ] Basic UI
[x] Bootstrap UI  
[ ] Foundation UI
[ ] Ionic UI
[ ] Kendo UI
[ ] Material  
[ ] NG Bootstrap
[ ] Prime NG

Description

I'm using Angular CLI 1.6 and attempting to deploy my app.

When I run the ng build --extract-css --prod, I get the following error.

ERROR in @ng-dynamic-forms\ui-bootstrap\ui-bootstrap.ts(15,9): Error during template compile of 'DynamicFormsBootstrapUIModule'
  Could not resolve ngx-bootstrap/datepicker relative to C:/src/LunchVoting/Web/ClientApp/node_modules/@ng-dynamic-forms/ui-bootstrap/ui-bootstrap.d.ts..

Here's my package.json

{
  "name": "...",
  "version": "...",
  "license": "MIT",
  "scripts": {
    "generate": "swagger-typescript-generate -S ../swagger.json -D src/app/models/api -T typescript-angular",
    "ng": "ng",
    "start": "ng serve --extract-css",
    "build": "ng build --extract-css",
    "build:ssr": "npm run build -- --app=ssr --output-hashing=media",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular-devkit/schematics": "0.0.40",
    "@angular/animations": "^5.0.0",
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/platform-server": "^5.0.0",
    "@angular/router": "^5.0.0",
    "@ng-dynamic-forms/core": "^5.4.2",
    "@ng-dynamic-forms/ui-bootstrap": "^5.4.2",
    "@nguniversal/module-map-ngfactory-loader": "^5.0.0-beta.5",
    "angular2-text-mask": "^8.0.4",
    "angular2-toaster": "^4.0.1",
    "bootstrap": "^3.3.7",
    "core-js": "^2.4.1",
    "ng4-loading-spinner": "^1.1.1",
    "rxjs": "^5.5.6",
    "zone.js": "^0.8.18"
  },
  "devDependencies": {
    "@angular/cli": "1.6.0",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "swagger-typescript-generate": "^1.0.1-alpha.5",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "2.4.2"
  }
}
udos86 commented 6 years ago

@TheMagnificent11 Hi!

Please remember that ngx-bootstrap is now a peer dependency of @ng-dynamic-forms/ui-bootstrap.

So you need to install it via npm i ngx-bootstrap first before using the UI package.

TheMagnificent11 commented 6 years ago

Thanks, that fixed the issue