Closed ziyi2 closed 5 years ago
vue create的时候就加了babel和eslint
Possible duplicate of #3335
Confirmed, duplicate of #3335. Can be fixed by npm i -D webpack@~4.28
OK,那我觉得这个处理不是特别好,
Confirmed, duplicate of #3335. Can be fixed by
npm i -D webpack@~4.28
OK,那我觉得这个处理不是特别好,因为如果组员vue create或npm install之后还需要重新去兼容webpack的版本,这里我们的vuepress只是作为开发态UI的视图调试,那为了和vue cli3互不干扰,采用全局安装的形式应该是不错的选择把。
Version
3.3.0
Reproduction link
http://localhost:8084/
Environment info
Steps to reproduce
vue create 生成项目
npm install vuepress -D
npm run dev ("dev": "vuepress dev docs", docs中就一个README.md)
What is expected?
PS G:\git-lab\hui-vuepress> npm run dev
WAIT Extracting site metadata...
DONE [19:14:58] Build cd735c finished in 5546 ms!
What is actually happening?
1、去除本地安装vuepress,采用全局安装,可以运行 2、采用yarn安装可以
vuepress官方文档说
如果你的现有项目依赖了 webpack 3.x,推荐使用 Yarn 而不是 npm 来安装 VuePress。因为在这种情形下,npm 会生成错误的依赖树。