cotag / a2-file-drop

Angular2 Directive and Service for managing dragging and dropping files onto a webpage
0 stars 2 forks source link

aot compilation fails #6

Closed ckemmler closed 7 years ago

ckemmler commented 7 years ago

Hi,

Thank you for this library. We used it happily in development but found that it has issues for production, specifically if used in conjunction with aot compilation:

Warning: Can't resolve all parameters for ApiMock in /Users/candide/work/lify/apps/ng2/src/providers/mocks/api-mock.ts: (?). This will become an error in Angular v5.x
[18:40:23]  ngc finished in 27.41 s
[18:40:23]  preprocess started ...
[18:40:23]  deeplinks started ...
[18:40:25]  deeplinks finished in 1.67 s
[18:40:25]  optimization started ...
[18:40:34]  copy finished in 38.38 s
[18:40:52]  optimization finished in 26.85 s
[18:40:52]  preprocess finished in 28.52 s
[18:40:52]  webpack started ...
[18:41:05]  webpack finished in 12.81 s
[18:41:05]  sass started ...
[18:41:05]  uglifyjs started ...
[18:41:07]  ionic-app-script task: "build"
[18:41:07]  Error: [object Object]
Error: [object Object]
    at new BuildError (/Users/candide/work/lify/apps/ng2/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at ChildProcess.<anonymous> (/Users/candide/work/lify/apps/ng2/node_modules/@ionic/app-scripts/dist/worker-client.js:38:24)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at process.nextTick (internal/child_process.js:766:12)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/Cellar/node/7.7.4/bin/node" "/usr/local/bin/npm" "run" "ionic:build" "--prod" "--aot"
npm ERR! node v7.7.4
npm ERR! npm  v3.9.3
npm ERR! code ELIFECYCLE
npm ERR! Lify@ ionic:build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Lify@ ionic:build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Lify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs Lify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls Lify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/candide/work/lify/apps/ng2/npm-debug.log

Here's our packages.json:

{
  "name": "XXX",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "test": "ng test",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/compiler-cli": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@angular/router": "^4.0.0",
    "@ionic-native/core": "3.4.2",
    "@ionic-native/splash-screen": "3.4.2",
    "@ionic-native/status-bar": "3.4.2",
    "@ionic/storage": "2.0.1",
    "@ngx-translate/core": "^6.0.1",
    "@ngx-translate/http-loader": "0.0.3",
    "@types/file-saver": "0.0.1",
    "@types/mixpanel": "^2.11.0",
    "@types/moment-timezone": "^0.2.34",
    "@types/shortid": "0.0.28",
    "a2-file-drop": "^2.0.4",
    "angular-progress-http": "^0.5.0",
    "angular2-file-drop": "^0.2.0",
    "angular2-moment": "^1.3.3",
    "es6-promise-plugin": "^4.1.0",
    "file-saver": "^1.3.3",
    "ionic-angular": "3.0.1",
    "ionicons": "3.0.0",
    "jquery": "^3.2.1",
    "moment-timezone": "^0.5.13",
    "ng2-dnd": "^4.0.2",
    "ngx-cookie": "^1.0.0",
    "rxjs": "5.1.1",
    "shortid": "^2.2.8",
    "sw-toolbox": "3.4.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.0",
    "@ionic/cli-plugin-cordova": "1.4.0",
    "@ionic/cli-plugin-ionic-angular": "1.3.1",
    "@types/jasmine": "^2.5.45",
    "@types/jquery": "^2.0.45",
    "@types/node": "^7.0.22",
    "angular-cli": "^1.0.0-beta.28.3",
    "codecov": "^2.2.0",
    "connect": "^3.6.2",
    "jasmine": "^2.6.0",
    "jasmine-core": "^2.6.2",
    "jasmine-spec-reporter": "^4.1.0",
    "karma": "^1.7.0",
    "karma-chrome-launcher": "^2.1.1",
    "karma-coverage": "^1.1.1",
    "karma-jasmine": "^1.1.0",
    "karma-mocha-reporter": "^2.2.3",
    "karma-remap-istanbul": "^0.6.0",
    "protractor": "^5.1.2",
    "protractor-jasmine2-screenshot-reporter": "^0.3.5",
    "ts-node": "^3.0.4",
    "tslint": "^5.3.2",
    "tslint-eslint-rules": "^4.1.0",
    "typescript": "^2.2.2"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-statusbar",
    "cordova-plugin-console",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [
    "ios",
    {
      "platform": "ios",
      "version": "",
      "locator": "ios"
    }
  ],
  "description": "XXX-ng2: An Ionic project"
}

Any hint that would help us fix the issue will be more than welcome. Thanks!

Candide

stakach commented 7 years ago

We actually moved this project into another: https://www.npmjs.com/package/@aca-1/a2-widgets

Just so we would only have to publish one package for all the things. So I believe it is maintained over at:

ckemmler commented 7 years ago

Thank you so much for redirecting us there. Works like a charm now. We found you through npm and then went directly to the github issues, so I guess that explains why we didn't see the huge disclaimer.

Have a good one, and cheers again,

Candide