Type definitions paths are incorrect
See original GitHub issueWhen installing @operational/components
into a new project, the typings files contain incorrect import paths when requiring dependant interfaces, missing an additional ../
. This causes typescript compilation to fail on projects depending on this package.
E.g. node_modules/@operational/components/lib/Icon/Icon.d.ts
will contain this line:
declare const _default: import("../../../../node_modules/create-emotion-styled/types/react.d.ts").StyledOtherComponent<{}, import("../../../../node_modules/emotion-theming/types/index.d.ts").OptionalThemeProps<PropsWithTheme, {}>, any>;
Imports should instead start with ../../../../../node_modules
.
Looks like the error crept in after introducing the new build + babel plugin, though I do not have a clear idea on what exactly about it caused the issue.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Incorrect path to type definitions #1148 - imbhargav5/rooks
I got an error about the path to the type definitions being unresolvable. I'm using Yarn 1.22 with a Next.js project.
Read more >typescript - typings has wrong referenced path - Stack Overflow
When the index.d.ts is generated inside the dist folder, it has the wrong referenced path to the typings. import { CoolData } from...
Read more >API - esbuild
Bundling with esbuild only works with statically-defined imports (i.e. when the import path is a string literal). Imports that are defined at run-time...
Read more >Typescript — How to solve the problem with unresolved path ...
Generally, what should be done can be summarized as follows: Take a look into tsconfig.json and check if there are path aliases defined...
Read more >File path formats on Windows systems | Microsoft Learn
In this article, learn about file path formats on Windows systems, such as traditional DOS paths, DOS device paths, and universal naming ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
#579 to the rescue!
@TejasQ the issue persists, I’m getting the same
.d.ts
file as I copied in earlier.