Skip to content

Estree types missing #10010

@keliss

Description

@keliss

Describe the bug

Hello. After setting up a Svelte project with Typescript, I bumped into an error with missing type definitions for estree. I think they should ship with Svelte by default.

Reproduction

  1. Run yarn create vite my-app --template svelte-ts
  2. In package.json, change the build script to tsc --noEmit && vite build
  3. Run yarn build

Running yarn add -D @types/estree solves the issue.

Logs

../../.yarn/berry/cache/svelte-npm-4.2.8-42f12ed9c1-10c0.zip/node_modules/svelte/types/index.d.ts:276:59 - error TS2307: Cannot find module 'estree' or its corresponding type declarations.

276  import type { AssignmentExpression, Node, Program } from 'estree';
                                                              ~~~~~~~~

../../.yarn/berry/cache/svelte-npm-4.2.8-42f12ed9c1-10c0.zip/node_modules/svelte/types/index.d.ts:868:59 - error TS2307: Cannot find module 'estree' or its corresponding type declarations.

868  import type { AssignmentExpression, Node, Program } from 'estree';
                                                              ~~~~~~~~


Found 2 errors in the same file, starting at: ../../.yarn/berry/cache/svelte-npm-4.2.8-42f12ed9c1-10c0.zip/node_modules/svelte/types/index.d.ts:276

System Info

System:
    OS: macOS 12.5
    CPU: (10) arm64 Apple M1 Max
    Memory: 253.09 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    Yarn: 4.0.2 - ~/.nvm/versions/node/v20.10.0/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
  Browsers:
    Chrome: 120.0.6099.129
    Safari: 15.6

Severity

annoyance

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions