安装 webpack-dev-server 失败

报错信息如下

npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "–D": Tags may not have any characters that encodeURIComponent encodes.

解决步骤

先安装全局环境

npm install webpack@3.6.0 webpack-dev-server@2.2.0 -g

在配置到package.json 开发环境中

npm install webpack@3.6.0 webpack-dev-server@2.2.0 -D

posted @ 2020-07-24 13:43  xujing123  阅读(1145)  评论(0编辑  收藏  举报