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

Typescript cannot find module @linthtml/dom-utils/lib/dom_elements #470

Open
regseb opened this issue Sep 10, 2022 · 2 comments
Open

Typescript cannot find module @linthtml/dom-utils/lib/dom_elements #470

regseb opened this issue Sep 10, 2022 · 2 comments

Comments

@regseb
Copy link

regseb commented Sep 10, 2022

Description

Typescript cannot find module @linthtml/dom-utils/lib/dom_elements. Directory lib doesn't exist in @linthtml/dom-utils.

Files

  • package.json
{
    "name": "testcase",
    "version": "1.0.0",
    "type": "module",
    "private": true,
    "dependencies": {
        "@linthtml/linthtml": "0.9.0",
        "typescript": "4.8.3"
    }
}
  • index.ts
import linthtml from "@linthtml/linthtml";

console.log(linthtml);

Commands

npm i
npx tsc index.ts

Results

node_modules/@linthtml/linthtml/dist/issue.d.ts:1:23 - error TS2307: Cannot find module '@linthtml/dom-utils/lib/dom_elements' or its corresponding type declarations.

1 import { Range } from "@linthtml/dom-utils/lib/dom_elements";
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@linthtml/linthtml/dist/legacy/inline_config.d.ts:3:32 - error TS2307: Cannot find module '@linthtml/dom-utils/lib/dom_elements' or its corresponding type declarations.

3 import { Comment, Range } from "@linthtml/dom-utils/lib/dom_elements";
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@linthtml/linthtml/dist/legacy/linter.d.ts:4:26 - error TS2307: Cannot find module '@linthtml/dom-utils/lib/dom_elements' or its corresponding type declarations.

4 import { Document } from "@linthtml/dom-utils/lib/dom_elements";
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@linthtml/linthtml/dist/linter.d.ts:4:26 - error TS2307: Cannot find module '@linthtml/dom-utils/lib/dom_elements' or its corresponding type declarations.

4 import { Document } from "@linthtml/dom-utils/lib/dom_elements";
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@linthtml/linthtml/dist/read-config.d.ts:2:29 - error TS2307: Cannot find module '@linthtml/dom-utils/lib/dom_elements' or its corresponding type declarations.

2 import { Node, Range } from "@linthtml/dom-utils/lib/dom_elements";
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 5 errors in 5 files.

Errors  Files
     1  node_modules/@linthtml/linthtml/dist/issue.d.ts:1
     1  node_modules/@linthtml/linthtml/dist/legacy/inline_config.d.ts:3
     1  node_modules/@linthtml/linthtml/dist/legacy/linter.d.ts:4
     1  node_modules/@linthtml/linthtml/dist/linter.d.ts:4
     1  node_modules/@linthtml/linthtml/dist/read-config.d.ts:2

Additional information

When installing @linthtml/dom-utils, there are the same errors.

@KamiKillertO
Copy link
Collaborator

@regseb Sorry it's something that I've forgotten to add in the readme. The packages are not ready to be used alone.
I'm still working on it.

@KamiKillertO
Copy link
Collaborator

KamiKillertO commented Oct 13, 2022

@regseb I've started working on that.
The next version (minor or patch, don't know yet) should fix the type exports.

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

2 participants