为什么 yarn add cross-env 就是报错,有通用解决方案吗

教程 is_echo ⋅ 于 1周前 ⋅ 最后回复由 Summer 1周前 ⋅ 104 阅读

执行命令:yarn add cross-env后如下

warning fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...

█████████████████████████████████
███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
error An unexpected error occurred: "EPROTO: protocol error, symlink '../acorn/bin/acorn' ->
'/home/vagrant/Code/sample/node_modules/acorn-dynamic-import/node_modules/.bin/acorn'".

info If you think this is a bug, please open a bug report with the information provided in "/home/vagrant/Code/sample/yarn-
error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
vagrant@homestead:~/Code/sample$

完全按教程来操作每个步骤,为啥在这被卡了几天了。偿试了别人的把package.json“cross-env”字符删掉,还是报同样的错误。各位大哥,麻烦指导一下,,
https://laravel-china.org/courses/laravel-essential-training-5.5/569/style-beautification

成为第一个点赞的人吧 :bowtie:
回复数量: 2
  • young Code is Poetry
    1周前

    homestead 或者 Windows环境下可以尝试在yarn 命令后面加 --no-bin-links

  • Summer MOD A Life-long learner.
    1周前

    在虚拟机下,尝试运行下面这个命令

    npm install acorn --no-bin-links

暂无评论~~

  请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!