dts-bundle icon indicating copy to clipboard operation
dts-bundle copied to clipboard

Unable to reference external typings

Open andrew-buckley opened this issue 6 years ago • 2 comments

I'm trying to use the "externals" flag to get the d.ts bundle to include typings for external libraries that exist in my node_modules folder, however for the life of my I cannot get this to work properly. I continually get : TypeError: Cannot read property 'file' of undefined. I've looked through other issues here and it seems some involve the author manually hacking the project, and others just seem to not have been resolved. Anyone else having trouble with this? I'd appreciate any help.

andrew-buckley avatar Apr 27 '18 21:04 andrew-buckley

i have this problem aswell !

cliedelt avatar Mar 24 '19 11:03 cliedelt

I think it is only for external files (outside directory) but will not resolve module X to node_modules\X.

So this will not ❌ work:

  • import * as wrap from "word-wrap"

But this did ✔ work for me:

  • import * as wrap from "../node_modules/word-wrap"

This project just need a little push :)

yonixw avatar Oct 22 '20 23:10 yonixw