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

Cannot import .d.ts in node modules #20854

Closed
swwind opened this issue Oct 9, 2023 · 0 comments · Fixed by #20918
Closed

Cannot import .d.ts in node modules #20854

swwind opened this issue Oct 9, 2023 · 0 comments · Fixed by #20918
Labels
bug Something isn't working correctly node compat

Comments

@swwind
Copy link

swwind commented Oct 9, 2023

When I try to import npm:[email protected] types cannot be inferred correctly.

import tailwindcss from "npm:[email protected]";
error: TS2305 [ERROR]: Module '"internal:https:///missing_dependency.d.ts"' has no exported member 'Config'.
import type { Config } from './config.d'
              ~~~~~~
    at file:https:///home/swwind/.cache/deno/npm/registry.npmjs.org/tailwindcss/3.3.3/types/index.d.ts:2:15

Here is the full index.d.ts you can find in npm.

import { PluginCreator } from 'postcss'
import type { Config } from './config.d'

declare const plugin: PluginCreator<string | Config | { config: string | Config }>

export { Config }
export default plugin

This code trying to import config.d.ts from index.d.ts by import "./config.d", but deno cannot handle it correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants