Skip to content

types/compiler/preprocess/index.d.ts: locate-character dependency: missing when compiler is imported as a dependency #6622

@btakita

Description

@btakita

Describe the bug

node_modules/.pnpm/svelte@3.42.1/node_modules/svelte/types/compiler/preprocess/types.d.ts(1,26): error TS2307: Cannot find module 'locate-character' or its corresponding type declarations.

locate-character is a devDependency, which is not installed when svelte is a devDependency or dependency.

Workaround: The package which has svelte as a dependency can add locate-character as a dependency.

Reproduction

Will add repo after ticket is created.

Logs

No response

System Info

System: OS: Linux 5.13 Arch Linux CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor Memory: 28.71 GB / 62.72 GB Container: Yes Shell: 5.8 - /usr/bin/zsh Binaries: Node: 16.6.0 - ~/.config/nvm/versions/node/v16.6.0/bin/node Yarn: 1.22.11 - /usr/bin/yarn npm: 7.19.1 - ~/.config/nvm/versions/node/v16.6.0/bin/npm Browsers: Brave Browser: 91.1.26.77 Chromium: 92.0.4515.107 Firefox: 90.0.2

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilerChanges relating to the compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions