macOS 系统下 操作 NPM 命令报错?

《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
最佳答案

@leo我找到了解决的方法 谢谢?你一直默默的指导 为你点赞?
方法如下

vagrant@homestead:~/Code/laravel-shop$ rm -rf node_modules/

vagrant@homestead:~/Code/laravel-shop$ yarn config set registry https://registry.npm.taobao.org

file

设置项目中的app.scss文件:/.../Code/laravel-shop/resources/assets/sass/app.scss

file

命令如下:

$ SASS_BINARY_SITE=http://npm.taobao.org/mirrors/node-sass yarn

$ yarn install --no-bin-links

$ npm run watch-poll

file

file

Yes success(happy coding!)。

5年前 评论
讨论数量: 7
leo

yarn global add cross-env

5年前 评论
leo

加上sudo

5年前 评论

@leo

file

file

![Uploading file...]()

![Uploading file...]()

5年前 评论
leo

应该是你的 Homestead Vagrant Box 版本太老,我这边 yarn 的版本是 1.5.1,你的菜 0.27

5年前 评论

@leo我找到了解决的方法 谢谢?你一直默默的指导 为你点赞?
方法如下

vagrant@homestead:~/Code/laravel-shop$ rm -rf node_modules/

vagrant@homestead:~/Code/laravel-shop$ yarn config set registry https://registry.npm.taobao.org

file

设置项目中的app.scss文件:/.../Code/laravel-shop/resources/assets/sass/app.scss

file

命令如下:

$ SASS_BINARY_SITE=http://npm.taobao.org/mirrors/node-sass yarn

$ yarn install --no-bin-links

$ npm run watch-poll

file

file

Yes success(happy coding!)。

5年前 评论

npm run watch-poll
提示:error This is probably not a problem with npm. There is likely additional logging output above
直接 npm install 更新后,再次执行 OK

5年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!