Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: dropzone__WEBPACK_IMPORTED_MODULE_1__ is not a constructor #151

Open
Cristhianzl opened this issue Feb 24, 2021 · 17 comments
Open

Comments

@Cristhianzl
Copy link

Hello,

All the dropzones that I'm using in my project stoped working from nothing.
I tried to go to in the past few weeks commits and check if was something new in the project, but seems like Angular just dont reconize the component.

Does anyone knows how to fix it?

Thanks a lot!

dropzone

@Cristhianzl
Copy link
Author

SOLVED:

It was just uninstall the 2 packages:

npm uninstall ngx-dropzone-wrapper
npm uninstall dropzone

and them install again the packages in the newest version:

npm i dropzone
npm i ngx-dropzone-wrapper

@Nascooo
Copy link

Nascooo commented Mar 11, 2021

@Cristhianzl
I have the similar Issue but it didn't Work
Could you Mention which version of DropZone & DropZone-Wrapper you are using :
i'm using "dropzone": "5.7.6" & "ngx-dropzone-wrapper": "^6.2.0"

@Cristhianzl
Copy link
Author

Cristhianzl commented Mar 11, 2021

@Cristhianzl
I have the similar Issue but it didn't Work
Could you Mention which version of DropZone & DropZone-Wrapper you are using :
i'm using "dropzone": "5.7.6" & "ngx-dropzone-wrapper": "^6.2.0"

Hello Nasco,

Im using these versions:
"dropzone": "^5.7.6"
"ngx-dropzone-wrapper": "^10.0.1"

Maybe if you update your dropzone-wrapper as I did, works!

@gowthamandev
Copy link

Hi,
I too facing the same issue, it is working when updating the "ngx-dropzone-wrapper" version "^8.0.0" to "^10.0.0", but I need a permanent solution because I am using this in an Enterprise application, it should not happen again right? is there any other way to solve this issue permanently, why this was happen? @sconix pls help me

@sconix
Copy link
Contributor

sconix commented Apr 2, 2021

Thats what the package lock files are for, making certain that certain versions are installed. At least can not see any other reason than your installed package versions changing.

@sobelfallcayor
Copy link

I use angular 13 and version 11.0.0 but reproduce this issue

@sobelfallcayor
Copy link

fixed here https://github.com/Liquid-JS/nxt-dropzone-wrapper

@adamhathcock
Copy link

verison 11.0.0 has this issue for me.

Downgrading to 10.0.1 or using the other package above works for me

@lazaro3487
Copy link

I have the same problem with version 7, 8 and 11. Only version 10 works for me.

Angular version 7.2.16

@wratho
Copy link

wratho commented Jul 13, 2022

Still seeing this issue with Angular 14 with version 11

@smandal92
Copy link

smandal92 commented Aug 9, 2022

Same issue
Error getting in console: ---
DropzoneComponent.html:1 ERROR TypeError: Dropzone is not a constructor
at dropzone.directive.js:58:1
at webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388:1)
at webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run (zone.js:138:1)
at webpackJsonp.../../../core/esm5/core.js.NgZone.runOutsideAngular (core.js:4708:48)
at webpackJsonp.../../../../ngx-dropzone-wrapper/dist/lib/dropzone.directive.js.DropzoneDirective.ngOnInit (dropzone.directive.js:57:1)
at checkAndUpdateDirectiveInline (core.js:12411:1)
at checkAndUpdateNodeInline (core.js:13935:1)
at checkAndUpdateNode (core.js:13878:1)
at debugCheckAndUpdateNode (core.js:14771:50)
at debugCheckDirectivesFn (core.js:14712:1)

Added in .ts file in angular project:
import { DropzoneModule, DROPZONE_CONFIG, DropzoneConfigInterface, DropzoneComponent } from 'ngx-dropzone-wrapper';

Angular version: "@angular/core": "^5.2.4",

Can you give any idea how to fix this issue.
Thankyou in advance

@wratho
Copy link

wratho commented Oct 10, 2022

this issue appears to still exist in the version 12? This seems like a pretty bad issue... and updates on an actual resolution?
seeing it on angular 14.2

@queejie
Copy link

queejie commented Oct 19, 2022

Seeing this for the first time, with an upgrade to Angular 14.2.5. Is there a known workaround? Thank you.

@queejie
Copy link

queejie commented Oct 26, 2022

SOLVED:

It was just uninstall the 2 packages:

npm uninstall ngx-dropzone-wrapper npm uninstall dropzone

and them install again the packages in the newest version:

npm i dropzone npm i ngx-dropzone-wrapper

This did not work.

@queejie
Copy link

queejie commented Oct 26, 2022

fixed here https://github.com/Liquid-JS/nxt-dropzone-wrapper
This does indeed fix it, but it looks like they're getting out of sync. Would it be possible to incorporate this back into the main library? Thanks very much for this wrapper.

@lazaro3487
Copy link

lazaro3487 commented Apr 24, 2023

Hello same problem with library version 14 and angular 14. I am unable to use this component anymore.

Does not work with angular 13 as well.

Is there any updates on this issue?

× Compiling with Angular sources in Ivy full compilation mode.
node_modules/ngx-dropzone-wrapper/lib/dropzone.directive.d.ts:52:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments.

52 static ɵdir: i0.ɵɵDirectiveDeclaration<DropzoneDirective, "[dropzone]", ["ngxDropzone"], { "disabled": "disabled"; "config": "dropzone"; }, { "DZ_INIT": "init"; "DZ_ERROR": "error"; "DZ_SUCCESS": "success"; "DZ_SENDING": "
sending"; "DZ_CANCELED": "canceled"; "DZ_COMPLETE": "complete"; "DZ_PROCESSING": "processing"; "DZ_DROP": "drop"; "DZ_DRAGSTART": "dragStart"; "DZ_DRAGEND": "dragEnd"; "DZ_DRAGENTER": "dragEnter"; "DZ_DRAGOVER": "dragOver"; "DZ_D
RAGLEAVE": "dragLeave"; "DZ_THUMBNAIL": "thumbnail"; "DZ_ADDEDFILE": "addedFile"; "DZ_ADDEDFILES": "addedFiles"; "DZ_REMOVEDFILE": "removedFile"; "DZ_UPLOADPROGRESS": "uploadProgress"; "DZ_MAXFILESREACHED": "maxFilesReached"; "DZ
_MAXFILESEXCEEDED": "maxFilesExceeded"; "DZ_ERRORMULTIPLE": "errorMultiple"; "DZ_SUCCESSMULTIPLE": "successMultiple"; "DZ_SENDINGMULTIPLE": "sendingMultiple"; "DZ_CANCELEDMULTIPLE": "canceledMultiple"; "DZ_COMPLETEMULTIPLE": "com
pleteMultiple"; "DZ_PROCESSINGMULTIPLE": "processingMultiple"; "DZ_RESET": "reset"; "DZ_QUEUECOMPLETE": "queueComplete"; "DZ_TOTALUPLOADPROGRESS": "totalUploadProgress"; }, never, never, false, never>;

@dqjauthentrics
Copy link

@lazaro3487 It's been awhile, and I don't remember what has happened in the interim, but I am using ngx-dropzone-wrapper 13.0.0 with Angular 15 and it was working with Angular 14 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests