A common culprit in this problem is a flag in the tsconfig.json file. To reference these files correctly, you must use
"moduleResolution": "node"
you will also need to import them using a module loader library such as Systemjs or something similar.
The Dragula library should come with a package that can then be imported into the module loader. With a system, it should be as simple as just including a package in your index.html file.
<script src="node_modules/dragula/path/to/bundle.js"></script>
or regardless of which file is being called.
If the library does not contain a package, or the package does not work for you, you can annotate it in your system configuration, and the system will do it for you.
System.config({ map:{ 'dragula': 'node_modules/dragula' } });
As always, this may require a little adjustment for your specific needs, but you must close you. To further customize the response to a specific scenario, additional information is required.
source share