mac下npm安装包报错误

npm install --save vue-chat-scroll

报错误
错误如下:

Macintosh:hwp-front yanghongwei$ npm install --save vue-chat-scroll
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! path /Users/yanghongwei/Documents/code/hwp-front/node_modules/.bin/webpack-dev-server
npm ERR! code EEXIST
npm ERR! Refusing to delete /Users/yanghongwei/Documents/code/hwp-front/node_modules/.bin/webpack-dev-server: #!/bin/sh
npm ERR! basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
npm ERR!
npm ERR! case `uname` in
npm ERR!     *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
npm ERR! esac
npm ERR!
npm ERR! if [ -x "$basedir/node" ]; then
npm ERR!   "$basedir/node"  "$basedir/../webpack-dev-server/bin/webpack-dev-server.js" "$@"
npm ERR!   ret=$?
npm ERR! else
npm ERR!   node  "$basedir/../webpack-dev-server/bin/webpack-dev-server.js" "$@"
npm ERR!   ret=$?
npm ERR! fi
npm ERR! exit $ret
npm ERR!  symlink target is not controlled by npm /Users/yanghongwei/Documents/code/hwp-front/node_modules/webpack-dev-server
npm ERR! File exists: /Users/yanghongwei/Documents/code/hwp-front/node_modules/.bin/webpack-dev-server
npm ERR! Move it away, and try again.

之前修改过全局安装权限问题
要怎么解决这个问题

阅读 5.4k
1 个回答

安装一下ajv试试
其实你可以删了包重新安装一遍试试

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题