0

I am trying to run my angular app on docker and once I do docker run, I am getting this error at the end of ng build --aot --configuration production --build-optimizer

I am not getting this error when I run the same ng build command in local , Build is completed successfully.

I checked the versions of angular app pacakages with ng --versionVersion command when I run docker build and it is same as local environment.

Error at the end of docker run

my package.json

{
  "name": "sample",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular-devkit/build-optimizer": "0.3.2",
    "@angular/animations": "^5.1.3",
    "@angular/cdk": "^5.0.3",
    "@angular/common": "^5.0.0",
    "@angular/core": "^5.1.3",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/material": "^5.0.3",
    "@angular/material-moment-adapter": "^8.0.0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "@molteni/export-csv": "0.0.2",
    "@swimlane/ngx-datatable": "11.3.0",
    "angular-froala-wysiwyg": "^2.9.1",
    "angular2-multiselect-dropdown": "^2.9.0",
    "bootstrap": "^3.3.7",
    "core-js": "2.6.12",
    "exceljs": "^2.0.1",
    "file-saver": "^1.3.2",
    "hammerjs": "^2.0.8",
    "intl": "^1.2.5",
    "jquery": "^3.2.1",
    "lodash": "4.17.20",
    "moment": "2.29.1",
    "ng2-dnd": "^5.0.2",
    "ng2-dragula": "^1.5.0",
    "ng2-pdf-viewer": "^4.1.1",
    "ng2-toastr": "^4.1.2",
    "ng2-tree": "^2.0.0-rc.6",
    "ngx-bootstrap": "^2.0.3",
    "ngx-cookie-service": "^1.0.10",
    "ngx-device-detector": "1.3.9",
    "papaparse": "^4.3.7",
    "ramda": "^0.25.0",
    "rxjs": "^5.5.2",
    "web-animations-js": "^2.3.1",
    "xlsx": "^0.12.3",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular-devkit/core": "0.0.29",
    "@angular/cli": "^1.6.1",
    "@angular/compiler": "^5.2.1",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/highcharts": "^5.0.44",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "handlebars": "4.7.6",
    "html-webpack-plugin": "^2.30.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",
    "karma-junit-reporter": "^2.0.1",
    "karma-phantomjs-launcher": "^1.0.4",
    "karma-sonarqube-unit-reporter": "0.0.21",
    "phantomjs": "~2.1.0",
    "phantomjs-prebuilt": "^2.1.7",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.4.2",
    "webpack-dev-server": "^2.11.0"
  }
}

  • Remove node-sass and install sass instead on your machine and build the new package.json in your server because as the message says is deprecated check this question to see if is the answer to your problem. https://stackoverflow.com/questions/65594119/node-sass-usage-is-deprecated-and-will-be-removed-in-a-future-major-version – Jose Lora Nov 18 '21 at 22:55
  • Thanks for the resonse. Tried removing the node-saas and tried to build again.. Still the same error "ModuleConcatenation bailout: Cannot concat with ./node_modules/@angular/animations/fesm2015/animations.js: Module ./node_modules/@angular/animations/fesm2015/animations.js is referenced from different chunks by these modules: ./node_modules/@angular/material/fesm2015/expansion.js, ./node_modules/@angular/material/fesm2015/tabs.js, ./node_modules/ngx-bootstrap/typeahead/fesm2015/ngx-bootstrap-typeahead.js" – Rakesh Joshi Nov 24 '21 at 05:00
  • can you share your `package.json` in your question body? – Jose Lora Nov 24 '21 at 13:17
  • Please check the question body for package.json – Rakesh Joshi Nov 26 '21 at 03:47

0 Answers0