yarn install 执行报错 install has been replaced with add,请教
第一次执行到这的时候报错
vagrant@homestead:~/code/weibo$ yarn add cross-env
错误:
warning " > sass-loader@7.1.0" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../parser/bin/babel-parser.js' -> '/home/vagrant/code/weibo/node_modules/@babel/core/node_modules/.bin/parser'".
接着按照以下步骤执行,
- 1 $ rm -rf node_modules
- 2 $ yarn config set registry http://registry.cnpmjs.org
- 3 删除 packaging.json 中的 cross-env
- 4 $ yarn install --no-bin-links
- 执行到步骤3 yarn install --no-bin-links时,报错了:
- error
install
has been replaced withadd
to add new dependencies. Run "yarn add -b -i -n -l -i -n -k -s" instead.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
网上找了下,有说 执行这个的:yarn install --force,又说用npm install的,等,试过没作用。
请教大家怎么处理,是什么原因?感谢!
推荐文章: