Closed lsnow99 closed 3 years ago
You should run vuepress export .
not yarn run vuepress export .
. If you want to avoid installing Vuepress globally, add a new script to package.json
like this
{
"scripts": {
"export": "vuepress export ."
}
}
and then you can use yarn export
Hmm, I tried both of those but same issue
$ yarn run export
yarn run v1.22.10
$ vuepress export .
Unknown command: export .
tip Did you miss to specify the target docs dir? e.g. vuepress export [targetDir].
tip A custom command registered by a plugin requires VuePress to locate your site configuration like vuepress dev or vuepress build.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ yarn export
yarn run v1.22.10
$ vuepress export .
Unknown command: export .
tip Did you miss to specify the target docs dir? e.g. vuepress export [targetDir].
tip A custom command registered by a plugin requires VuePress to locate your site configuration like vuepress dev or vuepress build.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ yarn export .
yarn run v1.22.10
$ vuepress export . .
Unknown command: export . .
tip Did you miss to specify the target docs dir? e.g. vuepress export [targetDir].
tip A custom command registered by a plugin requires VuePress to locate your site configuration like vuepress dev or vuepress build.
Then I installed vuepress globally:
$ vuepress export .
Unknown command: export .
tip Did you miss to specify the target docs dir? e.g. vuepress export [targetDir].
tip A custom command registered by a plugin requires VuePress to locate your site configuration like vuepress dev or vuepress build.
Try vuepress export src
No dice :/
$ yarn export src
yarn run v1.22.10
$ vuepress export . src
Unknown command: export . src
tip Did you miss to specify the target docs dir? e.g. vuepress export [targetDir].
tip A custom command registered by a plugin requires VuePress to locate your site configuration like vuepress dev or vuepress build.
error Command failed with exit code 1.
Here's my directory tree:
manual/
docs/
node_modules/
src/
package.json
You need to replace that .
with src
in package.json
and then just yarn export
Right, sorry I copied the wrong output
$ yarn export src
yarn run v1.22.10
$ vuepress export . src
Unknown command: export . src
tip Did you miss to specify the target docs dir? e.g. vuepress export [targetDir].
tip A custom command registered by a plugin requires VuePress to locate your site configuration like vuepress dev or vuepress build.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Okay, one more time :D
In package.json
{
"scripts": {
"export": "vuepress export src"
}
}
an then in console yarn export
Works! Thank you
Hello! Same issue, export not work with Unknown command: export docs package.json:
{
"scripts": {
"dev": "vuepress dev docs",
"build": "vuepress build docs",
"export": "vuepress export docs"
},
"devDependencies": {
"@snowdog/vuepress-plugin-pdf-export": "^1.1.0"
}
}
npm run dev and npm run build works fine
UPD:
When i run npm run build
- seen an warning:
warning An error was encountered in plugin "@snowdog/vuepress-plugin-pdf-export"
@2618094 Could you please open a new issue and post the actual error message?
I have the same problem, but I solved it with
"scripts": {
"docs:pdf": "npm run docs:build && cd docs && vuepress export ."
}
then
yarn docs:pdf
@haifengkao
Do you have VuePress installed globally?
Did you try "docs:pdf": "vuepress export docs"
, ofc with vuepress added as a dependency?
I'm asking this questions, because your solutions seem to be a hack, not a proper way of handling this problem.
Do you have VuePress installed globally?
<- No
Did you try "docs:pdf": "vuepress export docs", ofc with vuepress added as a dependency?
<- Yes, it works.
so the right steps are
yarn add -D vuepress
yarn add -D @snowdog/vuepress-plugin-pdf-export
"scripts": {
"docs:pdf": "vuepress export docs"
}
yarn docs:pdf
Hi,
I've set up the plugin according to the Readme, but I am getting
Unknown command: export .
when I runyarn run vuepress export .
My folder structure is:
(generated by the guide at https://vuepress.vuejs.org/guide/getting-started.html#prerequisites) and I am running from within the docs folder.