简体   繁体   中英

Bower components not working on production in angular meteor

My app is working normally when I'm developing locally, I've tried meteor reset and everything still works well.

When I upload it with mupx or even in heroku it gives me errors that modules are not available and such.

在此处输入图片说明

This is my bower.json file:

{
  "name": "blueSoft",
  "version": "0.0.0",
  "license": "MIT",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    ".meteor/local/bower",
    "test",
    "tests"
  ],
  "dependencies": {
    "angular-credit-cards": "~2.3.5",
    "angular-chart.js": "~0.8.8",
    "ng-file-upload": "^12.0.4",
    "datatables.net": "^1.10.11",
    "fullcalendar": "^2.6.1",
    "datatables.net-dt": "^1.10.11",
    "angular-google-maps": "^2.3.4",
    "angular-material-data-table": "^0.10.9"
  },
  "overrides": {
    "angular": {
      "main": []
    }
  },
  "resolutions": {
    "angular": "^1.4.0"
  }
}

Here's my lib/app.ng.js file

angular.module('blueSoftApp', [
  'angular-meteor',
  'ui.router',
  'ngMaterial',
  'md.data.table',
  'ui.calendar',
  'ngMessages',
  'countTo',
  'chart.js',
  'angularUtils.directives.dirPagination',
  'credit-cards',
  'ngFileUpload',
  'ngMaterialDatePicker',
  'uiGmapgoogle-maps'
])

onReady = function() {
  angular.bootstrap(document, ['blueSoftApp']);
};

if(Meteor.isCordova) {
  angular.element(document).on('deviceready', onReady);
} else {
  angular.element(document).ready(onReady);
}

I can't seem to figure out what's going on :(

Do you have a postinstall job running on the heroku image that will run bower install for you remotely?

http://xseignard.github.io/2013/02/18/use-bower-with-heroku/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM