valor-software / ng2-dragula

Simple drag and drop with dragula
http://valor-software.com/ng2-dragula/
MIT License
1.91k stars 430 forks source link

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

Open bardhyliis opened 1 year ago

bardhyliis commented 1 year ago

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)

bongbx commented 1 year ago

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)

JGSolutions commented 1 year ago

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 commented 1 year ago

Any updates on this?

JGSolutions commented 1 year ago

@bardhyliis Did you solve this issue?

entc commented 7 months ago

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'_
mlimap commented 5 months ago

npm i dragula --save