[bug report] Can't resolve 'dragula' in '\node_modules\ng2-dragula\fesm2022'
- [x] My issue title starts with
[bug report] - [x] I have read the README, especially the 'classic blunders' section, and the dragula docs.
- [x] I have searched through the
ng2-dragulaissues for related problems, including closed issues. - [x] I have browsed through the issues labeled "future reference" for problems that have been solved before or have a known workaround.
- [x] I am using the latest version of
ng2-dragula.
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)
Versions (required)
- "@angular/core": "^16.0.2"
- "ng2-dragula": "^5.0.0",
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)
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.
Any updates on this?
@bardhyliis Did you solve this issue?
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'
npm i dragula --save