Update to angular 8 #1092

Open
opened 2019-05-29 07:09:35 +00:00 by jpike88 · 4 comments
jpike88 commented 2019-05-29 07:09:35 +00:00 (Migrated from github.com)

ng2-file-upload@1.3.0 requires a peer of @angular/common@^2.3.1 || >=4.0.0 but none is installed. You must install peer dependencies yourself

```ng2-file-upload@1.3.0 requires a peer of @angular/common@^2.3.1 || >=4.0.0 but none is installed. You must install peer dependencies yourself```
adessilly commented 2019-06-04 10:39:30 +00:00 (Migrated from github.com)

I guess you have this error when you do :
ng update @angular/cli @angular/core
I fixed it by forcing the update, and everything works fine :
ng update @angular/cli @angular/core --force
By the way, ng2-file-upload doesn't work anymore if you enable ivy, so I've forked the project and rebuilt it in an angular 8 library, now it works. Sorry, it's not documented but it was initially for my own usage (to test ivy in my apps).

I changed the prefix from ng2XXX to adXXX.

import { FileItem, FileUploader } from 'ad-file-upload';
...
<input type="file" adFileSelect [uploader]="uploader" multiple
...

https://www.npmjs.com/package/ad-file-upload

I guess you have this error when you do : `ng update @angular/cli @angular/core` I fixed it by forcing the update, and everything works fine : `ng update @angular/cli @angular/core --force` By the way, ng2-file-upload doesn't work anymore if you enable ivy, so I've forked the project and rebuilt it in an angular 8 library, now it works. Sorry, it's not documented but it was initially for my own usage (to test ivy in my apps). I changed the prefix from ng2XXX to adXXX. ``` import { FileItem, FileUploader } from 'ad-file-upload'; ... <input type="file" adFileSelect [uploader]="uploader" multiple ... ``` https://www.npmjs.com/package/ad-file-upload
julianobrasil commented 2019-07-11 23:44:37 +00:00 (Migrated from github.com)

As pointed out by @adessilly, it has issues with Ivy too:


../node_modules/ng2-file-upload/file-upload/file-upload.module.d.ts:1:22 - error TS-996003: Appears in the NgModule.exports of xxxxModule, but could not be resolved to an
NgModule, Component, Directive, or Pipe class
As pointed out by @adessilly, it has issues with Ivy too: <pre><code> ../node_modules/ng2-file-upload/file-upload/file-upload.module.d.ts:1:22 - error TS-996003: Appears in the NgModule.exports of xxxxModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class </code></pre>
earshinov commented 2019-08-26 13:16:07 +00:00 (Migrated from github.com)

The problem is similar to angular-froala-wysiwyg. Both ng2-file-uploader and angular-froala-wysiwyg use ngm for building the project. For compatibility with Ivy, Angular CLI should better be used. In angular-froala-wysiwyg, someone already volunteered to perform the migration to Angular CLI: https://github.com/froala/angular-froala-wysiwyg/pull/329. The same steps can be applied to ng2-file-upload.

The problem is similar to [angular-froala-wysiwyg](https://github.com/froala/angular-froala-wysiwyg). Both ng2-file-uploader and angular-froala-wysiwyg use `ngm` for building the project. For compatibility with Ivy, Angular CLI should better be used. In angular-froala-wysiwyg, someone already volunteered to perform the migration to Angular CLI: https://github.com/froala/angular-froala-wysiwyg/pull/329. The same steps can be applied to ng2-file-upload.
Chealer commented 2021-08-11 15:56:03 +00:00 (Migrated from github.com)

@jpike88 thanks for clarifying the reported issue

@jpike88 thanks for clarifying the reported issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#1092