ng2-dragula icon indicating copy to clipboard operation
ng2-dragula copied to clipboard

[bug report] Can't resolve 'dragula' in '\node_modules\ng2-dragula\fesm2022'

Open bardhyliis opened this issue 2 years ago • 6 comments

Describe the bug (required)

I just installed the latest version on angular 16 and it is giving me this error when I run the app

./node_modules/ng2-dragula/fesm2022/ng2-dragula.mjs:5:0-39 - Error: Module not found: Error: Can't resolve 'dragula' in 'C:\Users\asus\Desktop\app\node_modules\ng2-dragula\fesm2022'

To Reproduce (required)

Steps to reproduce the behavior:

I really don't have anything else except just installing it.

Screenshots (optional)

image

Versions (required)

  • "@angular/core": "^16.0.2"
  • "ng2-dragula": "^5.0.0",

bardhyliis avatar Jul 22 '23 16:07 bardhyliis

hi @bardhyliis try install dragula: npm i dragula

it seems in version 2.1.1: dragula is required package if you use ng2-dragula (like ng2-charts)

bongbx avatar Jul 24 '23 03:07 bongbx

Having the same issue. Update package to 5.0.1

@bongbx yes v2.1.1 works which we had that package version installed for the past 2 years.

JGSolutions avatar Aug 25 '23 14:08 JGSolutions

Any updates on this?

JGSolutions avatar Sep 20 '23 19:09 JGSolutions

@bardhyliis Did you solve this issue?

JGSolutions avatar Sep 21 '23 18:09 JGSolutions

Wanted to try out this module and run into the same issue:

Angular 16.1.6 ng2-dragula: 5.0.2

npm i --legacy-peer-deps ng2-dragula

./node_modules/ng2-dragula/fesm2022/ng2-dragula.mjs:5:0-39 - Error: Module not found: Error: Can't resolve 'dragula' in '/home/..../node_modules/ng2-dragula/fesm2022'

Error: node_modules/ng2-dragula/DragulaOptions.d.ts:1:51 - error TS2307: Cannot find module 'dragula' or its corresponding type declarations.

1 import { DragulaOptions as OriginalOptions } from 'dragula'; ~~~~~~~~~

Error: node_modules/ng2-dragula/DrakeWithModels.d.ts:1:23 - error TS2307: Cannot find module 'dragula' or its corresponding type declarations.

1 import { Drake } from 'dragula'; ~~~~~~~~~

Error: node_modules/ng2-dragula/MockDrake.d.ts:5:23 - error TS2307: Cannot find module 'dragula' or its corresponding type declarations.

5 import { Drake } from 'dragula'; ~~~~~~~~~

import { DragulaModule } from 'ng2-dragula';

I guess the problem might be solved by using 'ng2-dragula' instead of 'dragula'

entc avatar Apr 08 '24 21:04 entc

npm i dragula --save

mlimap avatar May 21 '24 04:05 mlimap