Closed Mister-Hope closed 3 years ago
Not familiar with yarn v2 yet.
Meanwhile, I am having some troubles with yarn 1.
When requiring vuepress in a workspace with vuepressV1:
{
"name": "demo",
"scripts": {
"build": "vuepress build src",
"clean-serve": "vuepress dev src --no-cache",
"eject": "vuepress eject-hope src",
"serve": "vuepress dev src"
},
"devDependencies": {
"vuepress": "1.7.1",
}
}
But I can not get a bin folder with vuepress 2
I both tried on Windows20H2 and WSL2(Ubuntu 20.04) with Node 14.15.3 and Yarn 1.22.5.
I am able to run vuepress in the root folder(the bin folder has vuepress
), while the projects inside it are catching issues.
Could you check the package.json for vuepress2?
I think
"bin": {
"vuepress": "lib/cli.js"
},
is required for everything to work fine. @meteorlxy
And if it's an issue, would you mind publishing a new version please?
P.S.: That may be the reason why I cannot found the vuepress command with Yarn2.
The vuepress
command is provided by @vuepress/cli
.
So the @vuepress/cli
that required by vuepress
did not take effect when using yarn v2? 🤔
The
vuepress
command is provided by@vuepress/cli
.So the
@vuepress/cli
that required byvuepress
did not take effect when using yarn v2? 🤔
It's even not working with yarn V1 in my case. The screenshot I provides are all with v1
Edit: wait, I will try requiring @vuepress/cli
and see if it works
I think we should metion it through docs, that if we are using workspace, we should require @vuepress/cli
to get the vuepress command. @meteorlxy Or we should probably make some changes to let the bin generated by the vuepress
package and remain the cli file in @vuepress/cli
I am afraid the yarnV2 issue is related to it too. Yarn 2 only extracts command which is directly required by the project.
We need to confirm if the fix works in next release
Bug report
Description
Steps to reproduce
Expected behavior
Screenshots
Environment info
vuepress info
: