I have forked, cloned and modified the angular material repository to suit my needs. Code in the dev-app runs fine.
Now I want to use this module, more precisely the DragDropmodule
of @angular/cdk
, in another angular app I am working on.
I therefore ran gulp cdk:build-release
and obtained the dist/releases/cdk
folder containing built modules.
How do I use this compiled module's DragDropModule
in my other project now? I tried npm link
. This works to some extent as I can import the module now by
import { DragDropModule } from 'material2c/dist/releases/cdk/drag-drop';
However, trying ng serve
gives a bunch of errors
ERROR in C:/Users/admin/Documents/material2/dist/releases/cdk/esm5/drag-drop.es5.js
Module not found: Error: Can't resolve '@angular/cdk/bidi' in 'C:\Users\admin\Documents\material2\dist\releases\cdk\esm5'
ERROR in C:/Users/admin/Documents/material2/dist/releases/cdk/esm5/drag-drop.es5.js
Module not found: Error: Can't resolve '@angular/cdk/coercion' in 'C:\Users\admin\Documents\material2\dist\releases\cdk\esm5'
ERROR in C:/Users/admin/Documents/material2/dist/releases/cdk/esm5/drag-drop.es5.js
Module not found: Error: Can't resolve '@angular/cdk/platform' in 'C:\Users\admin\Documents\material2\dist\releases\cdk\esm5'
ERROR in C:/Users/admin/Documents/material2/dist/releases/cdk/esm5/drag-drop.es5.js
Module not found: Error: Can't resolve '@angular/cdk/scrolling' in 'C:\Users\admin\Documents\material2\dist\releases\cdk\esm5'
Any help appreciated :-)