vuepress-cli: command not found 不是内部或外部命令,也不是可运行的程序

第一步

yarn add -D vuepress
yarn add vuepress-cli

安装cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

安装 pnpm

npm i pnpm -g

升级 pnpm

pnpm add -g pnpm to update 

安装 vuepress

cnpm install -D vuepress
cnpm install -D vuepress-cli

切换淘宝源

pnpm config set registry https://registry.npmmirror.com

安装项目依赖

pnpm install

安装日志

yarn add v1.22.19                                                                                                       warning 
package.json: License should be a valid SPDX license expression                                                 warning package-
lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in 
order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.                                                                                      
warning jetlinks-docs: License should be a valid SPDX license expression                                                [1/4] 
Resolving packages...                                                                                             warning vuepress 
> @vuepress/types > @types/markdown-it > highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest                                                                                                             
> [2/4] Fetching packages...                                                                                              warning 
url-loader@1.1.2: Invalid bin field for "url-loader".                                                           [3/4] Linking 
dependencies...                                                                                           [4/4] Building fresh 
packages...                                                                                        success Saved lockfile.                                                                                                 
warning jetlinks-docs: License should be a valid SPDX license expression                                                success 
Saved 36 new dependencies.                                                                                      info Direct 
dependencies                                                                                                ├─ vuepress-plugin-
medium-zoom@1.1.9                                                                                    └─ vuepress@1.9.7                                                                                                       
info All dependencies                                                                                                   ├─ 
@types/body-parser@1.19.2                                                                                            ├─ 
@types/connect-history-api-fallback@1.3.5                                                                            ├─ 
@types/connect@3.4.35                                                                                                ├─ 
@types/express-serve-static-core@4.17.29                                                                             ├─ 
@types/express@4.17.13                                                                                               ├─ 
@types/highlight.js@9.12.4                                                                                           ├─ 
@types/http-proxy@1.17.9                                                                                             ├─ 
@types/linkify-it@3.0.2                                                                                              ├─ 
@types/markdown-it@10.0.3                                                                                            ├─ 
@types/mdurl@1.0.2                                                                                                   ├─ 
@types/mime@1.3.2                                                                                                    ├─ 
@types/range-parser@1.2.4                                                                                            ├─ 
@types/source-list-map@0.1.2                                                                                         ├─ 
@types/tapable@1.0.8                                                                                                 ├─ 
@types/uglify-js@3.16.0                                                                                              ├─ 
@types/webpack-dev-server@3.11.6                                                                                     ├─ 
@types/webpack-sources@3.2.0                                                                                         ├─ 
@types/webpack@4.41.32                                                                                               ├─ 
@vuepress/core@1.9.7                                                                                                 ├─ 
@vuepress/markdown-loader@1.9.7                                                                                      ├─ 
@vuepress/plugin-active-header-links@1.9.7                                                                           ├─ 
@vuepress/plugin-last-updated@1.9.7                                                                                  ├─ 
@vuepress/plugin-nprogress@1.9.7                                                                                     ├─ 
@vuepress/plugin-register-components@1.9.7                                                                           ├─ 
@vuepress/plugin-search@1.9.7                                                                                        ├─ 
@vuepress/theme-default@1.9.7                                                                                        ├─ bundle-
require@2.1.8                                                                                                 ├─ esbuild-windows-
64@0.14.7                                                                                            ├─ esbuild@0.14.7                                                                                                       
├─ highlight.js@9.18.5                                                                                                  ├─ is-
plain-obj@3.0.0                                                                                                   ├─ node-
forge@0.9.0                                                                                                     ├─ stylus@0.54.8                                                                                                        
├─ vue-router@3.5.4                                                                                                     ├─ 
vuepress-plugin-medium-zoom@1.1.9                                                                                    └─ 
vuepress@1.9.7 

验证

{
  "name": "xxx",
  "license": "apache 2.0",
  "scripts": {
    "docs:dev": "vuepress dev .",
    "docs:build": "vuepress build .",
    "build": "node --max_old_space_size=10240 build/build.js"
  },
  "devDependencies": {
    "vuepress": "^1.9.7",
    "vuepress-plugin-medium-zoom": "^1.1.8"
  }
}

启动

> docs:dev
> vuepress dev .

wait Extracting site metadata... 
tip Apply theme @vuepress/theme-default ... 
tip Apply plugin container (i.e. "vuepress-plugin-container") ... 
success [10:05:15] Build b100a3 finished in 16599 ms!     
> VuePress dev server listening at http://localhost:9999/ 

可以看到

  • VuePress dev server listening at http://localhost:9999/
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

全面解读

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值