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

Types not being included when using modules linked using npm link #33466

Open
callumacrae opened this issue Sep 17, 2019 · 2 comments
Open

Types not being included when using modules linked using npm link #33466

callumacrae opened this issue Sep 17, 2019 · 2 comments
Assignees
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@callumacrae
Copy link

TypeScript Version: 3.7.0-dev.20190917

Search Terms: linked npm module

Code

This is a build problem, not a code problem. Let me know if this issue should be moved to ts-loader or something like that!

The problem can be reproduced here: https://github.com/callumacrae/typescript-bug

It seems to lie in the tsconfig.json, where in the include I am trying to include the typings from generic-minimal, a repository that will contain (untranspiled) code and modules common between my projects.

Direct link to tsconfig.json: https://github.com/callumacrae/typescript-bug/blob/master/tsconfig.json#L31

When generic-minimal is installed through npm install, this works fine. When it is symlinked in using npm link, I get a type error caused by the vue-meta types not being brought in—and vue-meta is installed in the parent repository, not in generic-minimal. I don't see how the two things should have any effect on each other at all.

I might have got what exactly is causing this issue slightly incorrect but I have been on this since Friday now and this is as small a repro as I've managed to come up with :(

Expected behavior:
Actual behavior:

see above

Related Issues:

This issue seems to be related to #31527, although it isn't the same issue.

@RyanCavanaugh RyanCavanaugh added the Needs More Info The issue still hasn't been fully clarified label Sep 17, 2019
@RyanCavanaugh
Copy link
Member

We're not able to investigate repros that rely on third-party build tools like vue-cli-service build. If you can reproduce the problem with tsc or something directly equivalent, we can take a look.

Also, please provide direct commands to run in your instructions; it is unnerving for us to execute npm run build from an arbitrary repo without knowing what's happening under the covers, so we have to check what's in package.json anyway.

@callumacrae
Copy link
Author

Alright, will try to replicate with tsc :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

2 participants