Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

command 'slidev.preview-refresh' not found #23

Closed
FrancescoSaverioZuppichini opened this issue Mar 7, 2024 · 3 comments
Closed

command 'slidev.preview-refresh' not found #23

FrancescoSaverioZuppichini opened this issue Mar 7, 2024 · 3 comments
Labels
bug Something isn't working has workaround

Comments

@FrancescoSaverioZuppichini

Hi there 👋

I've installed globally

npm i -g @slidev/cli

Then the extension but I got this error

Screenshot 2024-03-07 at 23 00 33

Thanks a lot 🤗

Fra

@FrancescoSaverioZuppichini FrancescoSaverioZuppichini changed the title Not working command 'slidev.preview-refresh' not found Mar 7, 2024
@yu45020
Copy link

yu45020 commented Apr 15, 2024

Same here. Installed globally but no preview. I then install manually following this instruction, and it works, and it works in vs code.

A simple fix: copy package.json to any folder with a markdown file. The extension works again. The two files can be generated by npm install @slidev/cli @slidev/theme-default

package.json file content

{
  "dependencies": {
    "@slidev/cli": "^0.49.0-beta.3",
    "@slidev/theme-default": "^0.25.0"
  }
}

@KermanX
Copy link
Member

KermanX commented Apr 16, 2024

This is because Slidev cannot make sure it is a "Slidev Markdown" or a common markdown when there is no package.json indicating this. A simpler workaround could be setting slidev.enabled to true in the workspace settings.

@KermanX KermanX added enhancement New feature or request bug Something isn't working has workaround and removed enhancement New feature or request labels Apr 16, 2024
@KermanX
Copy link
Member

KermanX commented May 10, 2024

We've rewritten the VSCode extension for Slidev (slidevjs/slidev#1557). Upgrading the VSCode extension to the latest (0.49.1) can fix this issue.

@KermanX KermanX closed this as completed May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working has workaround
Projects
None yet
Development

No branches or pull requests

3 participants