Skip to content

unplugin-solid tried to access vite, but it isn't declared in its dependencies #258

Description

@rtritto

Describe the bug

Using tsdown to build, I got:

 ERROR  Error: unplugin-solid tried to access vite, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: vite (via "vite\package.json")
Required by: unplugin-solid@virtual:7144a49eca7a1ac6087930f7bae5e5d90694ae9ca6ae113521e1fca451fea8fa82c8b6e7b7ee9541e0ccb598f39743398f98a58f9584f155654047bef764db74#npm:1.0.0 (via C:\vike-lite\.yarn\__virtual__\unplugin-solid-virtual-f368d8be09\5\Users\<USER>\AppData\Local\Yarn\Berry\cache\unplugin-solid-npm-1.0.0-2448de2150-10c0.zip\node_modules\unplugin-solid\dist\src-DcGJ2TSB.js)

    at makeError (C:\vike-lite\.pnp.cjs:12599:34)
    at resolveToUnqualified (C:\vike-lite\.pnp.cjs:14245:21)
    at Object.resolveToUnqualified (C:\vike-lite\.pnp.cjs:14426:26)
    at resolve$1 (file:///C:/vike-lite/.pnp.loader.mjs:2034:31)
    at nextResolve (node:internal/modules/esm/hooks:785:28)
    at AsyncLoaderHooksOnLoaderHookWorker.resolve (node:internal/modules/esm/hooks:269:30)
    at MessagePort.handleMessage (node:internal/modules/esm/worker:251:24)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:845:20)
    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)

Reproduction

System Info

System:
    OS: Windows 11
  Binaries:
    Node: 24.12.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 4.17.1 - C:\Program Files\nodejs\yarn.CMD
    npm: 11.6.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 10.33.0 - C:\Program Files\nodejs\pnpm.CMD

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions