Skip to content

Type error when using strict package manager #20

@Methuselah96

Description

@Methuselah96
Contributor

Initial checklist

  • I read the support docs
    I read the contributing guide
    I agree to follow the code of conduct
    I searched issues and couldn’t find anything (or linked relevant results below)

Affected packages and versions

hast-util-raw@8.0.0 and hast-util-raw@9.0.0

Looks like the reference to @types/unist was introduced in #17.

Link to runnable example

No response

Steps to reproduce

  1. Create project using hast-util-raw with a strict package manager like Yarn PnP and skipLibCheck set to false.
  2. Type-check using TypeScript.

Expected behavior

No type errors.

Actual behavior

Type error:

ERROR in node_modules/hast-util-raw/lib/index.d.ts:28:28
TS2307: Cannot find module 'unist' or its corresponding type declarations.
    26 | export type Location = import('parse5').Token.Location;
    27 | export type TagToken = import('parse5').Token.TagToken;
  > 28 | export type Point = import('unist').Point;
       |                            ^^^^^^^
    29 | export type VFile = import('vfile').VFile;
    30 | /**
    31 |  * Configuration.

Affected runtime and version

N/A

Affected package manager and version

No response

Affected OS and version

No response

Build and bundle tools

No response

Activity

changed the title [-]Type error when using strict package managers[/-] [+]Type error when using strict package manager[/+] on Aug 28, 2023
added
👋 phase/newPost is being triaged automatically
🤞 phase/openPost is being triaged manually
and removed
👋 phase/newPost is being triaged automatically
on Aug 28, 2023
remcohaszing

remcohaszing commented on Aug 28, 2023

@remcohaszing
Member

You’re right, this should be an explicit dependency. Would you like to add a PR for this?

added
👍 phase/yesPost is accepted and can be worked on
and removed
🤞 phase/openPost is being triaged manually
on Aug 28, 2023
github-actions

github-actions commented on Aug 28, 2023

@github-actions
added
👶 semver/patchThis is a backwards-compatible fix
🤞 phase/openPost is being triaged manually
and removed
👍 phase/yesPost is accepted and can be worked on
on Aug 28, 2023
added
👍 phase/yesPost is accepted and can be worked on
and removed
🤞 phase/openPost is being triaged manually
on Aug 28, 2023
github-actions

github-actions commented on Aug 28, 2023

@github-actions
wooorm

wooorm commented on Aug 28, 2023

@wooorm
Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Methuselah96@remcohaszing@wooorm

      Issue actions

        Type error when using strict package manager · Issue #20 · syntax-tree/hast-util-raw