Trying to have the project root outside the package directory leads to build errors as node is unavailable.
Reproduction
I have the following directory structure:
. # document root
├─ .vitepress # config dir & node root
├─ config.mts
├─ package.json # node Package config
└─ ...
├─ en_US # documentation in english
└─ ... # Markdown files and subdirectories
├─ de_DE # documentation in german
└─ ... # Markdown files and subdirectories
Due to the nature of the project I am working on, vitepress has to run in a yarn workspace. The current location for the workspace using vuepress is in the .vuepress folder. The directory structure is analogue to the one above. When executing npx vitepress build .. in the .vitepress directory some imports cannot be resolved. I believe, this is due to code beeing executed in . where vue is unavailable.
Is there a way to solve this, or is it just not reasonable to have the node config below the document root.
Expected behavior
I would expect the code to be executed in the cwd and therefore all imports beeing available.
System Info
OS: Manjaro Linux 6.6.19-1-MANJARO
node: v21.6.2
vue: 3.4.21
vitepress: 1.0.0-rc.45
Describe the bug
Trying to have the project root outside the package directory leads to build errors as node is unavailable.
Reproduction
I have the following directory structure:
Due to the nature of the project I am working on, vitepress has to run in a yarn workspace. The current location for the workspace using vuepress is in the
.vuepress
folder. The directory structure is analogue to the one above. When executingnpx vitepress build ..
in the.vitepress
directory some imports cannot be resolved. I believe, this is due to code beeing executed in.
wherevue is unavailable
.Is there a way to solve this, or is it just not reasonable to have the node config below the document root.
Expected behavior
I would expect the code to be executed in the cwd and therefore all imports beeing available.
System Info
Additional context
No response
Validations