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

Unable to run pnpm run docs or pnpm run docs:dev commands #563

Closed
3 of 5 tasks
uncenter opened this issue Jan 27, 2024 · 2 comments
Closed
3 of 5 tasks

Unable to run pnpm run docs or pnpm run docs:dev commands #563

uncenter opened this issue Jan 27, 2024 · 2 comments

Comments

@uncenter
Copy link
Contributor

Validations

Describe the bug

I'm perplexed why nobody else has experienced this. I've cleared my entire pnpm cache (deleted all node_modules folders, run pnpm store prune, gave up and just deleted the entire cache directory as well to be sure). pnpm install works just fine but running pnpm run docs in the root or pnpm run docs:dev in the /docs directory fails with this error:

> pnpm run docs:dev                                                                                                                         0ms

> @ docs:dev /Users/uncenter/Dev/shiki/docs
> vitepress dev

node:internal/modules/esm/resolve:264
    throw new ERR_MODULE_NOT_FOUND(
          ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/uncenter/Dev/shiki/node_modules/.pnpm/vitepress@1.0.0-rc.40_@algolia+client-search@4.22.1_@types+node@20.11.7_fuse.js@7.0.0_postcss_l3bquinv4wonchib7bnfm66cku/node_modules/shikiji/dist/index.mjs' imported from /Users/uncenter/Dev/shiki/node_modules/.pnpm/vitepress@1.0.0-rc.40_@algolia+client-search@4.22.1_@types+node@20.11.7_fuse.js@7.0.0_postcss_l3bquinv4wonchib7bnfm66cku/node_modules/vitepress/dist/node/cli.js
    at finalizeResolution (node:internal/modules/esm/resolve:264:11)
    at moduleResolve (node:internal/modules/esm/resolve:917:10)
    at defaultResolve (node:internal/modules/esm/resolve:1130:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36) {
  code: 'ERR_MODULE_NOT_FOUND',
  url: 'file:///Users/uncenter/Dev/shiki/node_modules/.pnpm/vitepress@1.0.0-rc.40_@algolia+client-search@4.22.1_@types+node@20.11.7_fuse.js@7.0.0_postcss_l3bquinv4wonchib7bnfm66cku/node_modules/shikiji/dist/index.mjs'
}

Reproduction

I'm not sure how to reproduce this, but it isn't really a bug with Shiki anyway. Just hoping for any ideas on how to fix whatever is going on with pnpm.

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
@antfu
Copy link
Member

antfu commented Jan 27, 2024

Have you run pnpm run build first

@uncenter
Copy link
Contributor Author

uncenter commented Jan 27, 2024

Ah, 🤦 . That's it. I thought that didn't apply since I was just trying to run Vitepress! Thanks for the fix. Might be something to note in CONTRIBUTING.md?

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

2 participants