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

@slidev/cli fails to recognize themes packages in two scenarios when installed with pnpm #1975

Open
gepz opened this issue Dec 4, 2024 · 0 comments
Labels
bug Something isn't working global installation

Comments

@gepz
Copy link

gepz commented Dec 4, 2024

Describe the bug

Slidev fails to recognize the default theme in two scenarios when using pnpm:

  1. When installed globally (pnpm add -g @slidev/cli @slidev/theme-default)
  2. When installed locally but running on files outside the project folder (pnpm exec slidev /path/to/outside/test.md)
    The same setups work correctly when using npm.

Minimal reproduction

Scenario 1 (Global):

  1. Install slidev globally using pnpm:
pnpm add -g @slidev/cli @slidev/theme-default
  1. Run slidev /path/to/file.md

Scenario 2 (Local):

  1. Create a project with local slidev installation:
mkdir slidev-test
cd slidev-test
pnpm init
pnpm add @slidev/cli @slidev/theme-default
  1. Run pnpm exec slidev /path/to/outside/test.md on a file outside the project directory

Both scenarios result in: "The theme "@slidev/theme-default" was not found in your project, do you want to install it now?"
Environment

  • Slidev version: ^0.50.0-beta.10
  • Browser: N/A (CLI issue)
  • OS: Linux
@KermanX KermanX added bug Something isn't working global installation labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working global installation
Projects
None yet
Development

No branches or pull requests

2 participants