Skip to content

Unable to start up slidev while running npm run dev in windows 10 pro using vscode #1983

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

Closed
kenPangTHC opened this issue Dec 20, 2024 · 4 comments

Comments

@kenPangTHC
Copy link

Describe the bug

Im currently having a problem trying to npm run dev to start up the slidev to preview the slides

A clear and concise description of what the bug is.

The following is the error message when

npm run dev
> dev
> slidev --open



  ●■▲
  Slidev  v0.50.0 

  theme       @slidev/theme-seriph
  css engine  unocss
  entry       C:\Users\kenpa\Documents\slidev\slidev\slides.md

  public slide show   > http://localhost:3030/
  presenter mode      > http://localhost:3030/presenter/
  slides overview     > http://localhost:3030/overview/
  export slides       > http://localhost:3030/export/
  remote control      > pass --remote to enable

  shortcuts           > restart | open | edit | quit
panic: runtime error: index out of range [4664] with length 4664

goroutine 2743 [running]:
github.com/evanw/esbuild/internal/sourcemap.DecodeVLQ({0xc001efa26b, 0x1238, 0x1?}, 0xc001616140?)
        github.com/evanw/esbuild/internal/sourcemap/sourcemap.go:126 +0x110
github.com/evanw/esbuild/internal/sourcemap.SourceMapPieces.Finalize({{0xc001ef8a80, 0x17eb, 0x2a36}, {0xc001efa26b, 0x1238, 0x124b}, {0xc001efb4a3, 0x13, 0x13}}, {0xc000a38000, ...})
        github.com/evanw/esbuild/internal/sourcemap/sourcemap.go:320 +0x474
github.com/evanw/esbuild/internal/linker.(*linkerContext).generateChunksInParallel.func1(_, {{0xc0076a18c0, 0x19}, 0xc008812900, {{0xc008832410, 0x2, 0x2}}, {0xc0088328b0, 0x1, 0x1}, ...})
        github.com/evanw/esbuild/internal/linker/linker.go:714 +0xa55
created by github.com/evanw/esbuild/internal/linker.(*linkerContext).generateChunksInParallel in goroutine 1862
        github.com/evanw/esbuild/internal/linker/linker.go:658 +0x878
C:\Users\kenpa\Documents\slidev\slidev\node_modules\esbuild\lib\main.js:993
                  reject(new Error(error2));
                         ^

Error: The service was stopped
    at C:\Users\kenpa\Documents\slidev\slidev\node_modules\esbuild\lib\main.js:993:26
    at responseCallbacks.<computed> (C:\Users\kenpa\Documents\slidev\slidev\node_modules\esbuild\lib\main.js:622:9)
    at Socket.afterClose (C:\Users\kenpa\Documents\slidev\slidev\node_modules\esbuild\lib\main.js:613:28)
    at Socket.emit (node:events:529:35)
    at endReadableNT (node:internal/streams/readable:1400:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v18.20.3

Minimal reproduction

Steps to reproduce the behavior:

  1. Go to vscode
  2. Install slidev for vscode extension
  3. Run npm init slidev@latest
  4. Run npm run dev
  5. See the error

You can use https://sli.dev/new to create a new project to reproduce the issue.

Environment

  • Slidev version: v0.50.0
  • Browser: Google Chrome Version 131.0.6778.140 (Official Build) (64-bit)
  • OS: Windows 11 Pro Version 24H2 OS Build 26100.2605

If you are using Slidev globally (i.e. npx slidev or npm i -g slidev), please try to reproduce the issue in a local project (i.e. npm create slidev@latest).

@alexzhang1030
Copy link
Contributor

related evanw/esbuild#4011

@alexzhang1030
Copy link
Contributor

Workaround here, pin esbuild version to 0.24.0, e.g. if you are using pnpm

{
  "pnpm": {
    "overrides": {
      "esbuild": "0.24.0"
    }
  }
}

@Chompas
Copy link

Chompas commented Dec 20, 2024

@alexzhang1030 I was just trying slidev and found this problem. Thanks for the temp fix.

@slidevjs slidevjs locked and limited conversation to collaborators Dec 20, 2024
@slidevjs slidevjs unlocked this conversation Dec 20, 2024
@kenPangTHC
Copy link
Author

related evanw/esbuild#4011

Thanks that resolved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants