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

[hello].paths.js swallows error #3149

Closed
4 tasks done
jcbhmr opened this issue Oct 28, 2023 · 0 comments · Fixed by #3201
Closed
4 tasks done

[hello].paths.js swallows error #3149

jcbhmr opened this issue Oct 28, 2023 · 0 comments · Fixed by #3201
Labels
build Related to the build system contribution welcome The team would welcome a contribution from the community for this issue stale

Comments

@jcbhmr
Copy link
Contributor

jcbhmr commented Oct 28, 2023

Describe the bug

when i make an obvious mistake in [hello].paths.js as a counterpart to the [hello].md dynamic route files, i just see a generic error message.

i want vitepress to actually show me an error message lol not just this generic message

Reproduction

https://stackblitz.com/edit/vite-32ue1q?file=docs%2F[hello].paths.js

// [hello].paths.js
import { iDontExist } from 'node:silly';

export default {
  async paths() {},
};

Expected behavior

i expect an error to be printed to the console similar to what happens if you do node docs/[hello].paths.js

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:silly
    at __node_internal_ (https://vite32ue1q-hour.w-credentialless.staticblitz.com/blitz.09144545.js:36:5410)
    at new <anonymous> (https://vite32ue1q-hour.w-credentialless.staticblitz.com/blitz.09144545.js:36:4172)
    at ESMLoader.<anonymous> (https://vite32ue1q-hour.w-credentialless.staticblitz.com/blitz.09144545.js:189:3457)
    at ESMLoader.<anonymous> (https://vite32ue1q-hour.w-credentialless.staticblitz.com/blitz.09144545.js:248:8318) {
  code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.9.2 - /usr/local/bin/pnpm
  npmPackages:
    vitepress: latest => 1.0.0-rc.24

Additional context

image
not very helpful 😢

Validations

@jcbhmr jcbhmr added the bug: pending triage Maybe a bug, waiting for confirmation label Oct 28, 2023
@brc-dd brc-dd added build Related to the build system contribution welcome The team would welcome a contribution from the community for this issue and removed bug: pending triage Maybe a bug, waiting for confirmation labels Oct 28, 2023
@github-actions github-actions bot added the stale label Dec 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build Related to the build system contribution welcome The team would welcome a contribution from the community for this issue stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants