Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to process when it has non relative imports #22

Closed
grofit opened this issue Aug 16, 2015 · 2 comments
Closed

Fails to process when it has non relative imports #22

grofit opened this issue Aug 16, 2015 · 2 comments
Milestone

Comments

@grofit
Copy link

grofit commented Aug 16, 2015

It seems to blow up when I have a reference in one d.ts to Bluebird which looks like this:

import * as Promise from "bluebird";

It gives the error:

TypeError: Cannot read property 'file' of undefined
    at C:\Code\Web\test\node_modules\dts-bundle\lib\index.js:125:55

The config being used is:

dtsBundle.bundle({
        name: pkg.name, // Lets call it "test"
        main: paths.output + "/definitions/index.d.ts", // Lets call it dist/definitions/index.d.ts
        out: paths.output + "/" + pkg.name + '.d.ts' // dist/definitions/test.d.ts
    });

Much like you I have a typings folder, but it is external to where the d.ts files are spat out, do I need to provide a link to them in the options somehow?

@SimoneGianni
Copy link

I was facing the same error, and as a temporary workaround to this problem on my machine, in index.js file line 124 before the if that gives error i added "if (!p) return;"

In my case, i did not want to include the typings of those libraries, cause they are already defined where later used in other projects.

@tolemac
Copy link
Contributor

tolemac commented Dec 22, 2015

+1
#27

@tolemac tolemac added this to the 0.4.0 version milestone Jan 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants