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

docs:dev works but docs:build reports an error: Error [ERR_MODULE_NOT_FOUND]: Cannot find module... #4440

Closed
4 tasks done
smallseapig opened this issue Dec 22, 2024 · 4 comments
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@smallseapig
Copy link

Describe the bug

I use vitepress@latest to document and the [email protected] component library, which works fine when running, but when I used the docs:build, I got an error with an error message of Error [ERR_MODULE_NOT_FOUND]: Cannot find module...

Reproduction

https://stackblitz.com/edit/vite-e44qnyyo?file=docs%2F.vitepress%2Ftheme%2Findex.js

Expected behavior

docs:build executed successfully

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-1240P
    Memory: 2.60 GB / 15.73 GB
  Binaries:
    Node: 18.20.3 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.3.0 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

Additional context

No response

Validations

@smallseapig smallseapig added the bug: pending triage Maybe a bug, waiting for confirmation label Dec 22, 2024
@brc-dd
Copy link
Member

brc-dd commented Dec 22, 2024

Make it noExternal: [/@opentiny\//],

@brc-dd brc-dd closed this as completed Dec 22, 2024
@smallseapig
Copy link
Author

I tried but it didn't work. Could you please execute the build command in the sandbox I sent

@brc-dd
Copy link
Member

brc-dd commented Dec 22, 2024

Yeah I had already tested. Seems to be working fine:

image

@smallseapig
Copy link
Author

Just tried again a few times, probably my local cache, I re-created the new project, finally succeeded, thank you so much!!!!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants