homestead虚拟机,通过npm下载依赖包和解决运行gulp报错问题
yarn出错问题

1. 在虚拟器运行 npm 下载依赖组件时报错:

npm ERR! EPROTO: protocol error, symlink ...

解决方案:

运行 npm 时增加参数 --no-bin-links 

npm install --no-bin-links

 

2. 执行 gulp 命令时报错:

ENOENT: no such file or directory, scandir '/home/vagrant/Code/sample/node_modules/node-sass/vendor'

解决方案:

使用 npm 重新生成 node-saaa

npm rebuild node-sass --no-bin-links

 

在windows host中的vagrant box Linux中使用npm install时,由于host os不支持linux的symbol link,所以必须使用 --no-bin-links 命令

 

加速 npm 下载速度

npm config set registry http://registry.npm.taobao.org

 

yarn install 报错

error An unexpected error occurred: "EPROTO: protocol error, symlink '../../

  1. 删除应用里面的 node_modules 文件夹。

    rm –rf node_modules

yarn install --save --no-bin-links

 

  1. 配置淘宝 npm 镜像。

$ npm install -g cnpm --registry=https://registry.npm.taobao.org

用 cnpm 重新安装。

$ cnpm install

等待安装完成。

$ downloading

进入应用根目录
(我的是 sample ) ,启动 gulp 。

$ gulp

如果出现以下界面,那就是成功了

 

[15:43:28] Using gulpfile ~/Code/sample/gulpfile.js

[15:43:28] Starting 'default'...

[15:43:28] Starting 'sass'...

 

Fetching Sass Source Files...

- resources/assets/sass/app.scss

 

Saving To...

 

 

homestead虚拟机,通过npm下载依赖包和解决运行gulp报错问题 yarn出错问题的更多相关文章

  1. Maven 无法下载依赖包的解决方法---三步dao!!!

    版权声明:本文为博主原创文章,转载请附上原文出处链接和本声明. 本文链接:https://www.cnblogs.com/WLCYSYS/p/11932157.html maven 自动下载依赖包出现 ...

  2. go 依赖包管理工具gb安装报错

    尝试了下gb工具,发现有个问题: [root@etcd1 test]# go get github.com/constabulary/gb/... /home/gopath/src/github.co ...

  3. 使maven2在下载依赖包的同时下载其源代码包。

    使maven2在下载依赖包的同时下载其源代码包的方法: 1. 使用maven命令:mvn dependency:sources 下载依赖包的源代码. 2. 使用参数: -DdownloadSource ...

  4. go mod 无法自动下载依赖包的问题

    go 11以后启用了go mod功能,用于管理依赖包. 当执行go mod init生成go.mod文件之后,golang在运行.编译项目的时候,都会检查依赖并下载依赖包. 在启动了go mod之后, ...

  5. maven项目如何从私服nexus中下载依赖包

    maven项目如何从私服nexus中下载依赖包   解决方法: 1.打开maven的config目录中settings.xml文件 2.在<profile></profiles> ...

  6. 解决maven 在intellij IDEA 下载依赖包速度慢的问题

    解决maven 在intellij IDEA 下载依赖包速度慢的问题 参考:https://www.jianshu.com/p/63a593700ebc

  7. maven下载依赖包下载失败

    在家办公,遇到项目的maven包下载不了,刚开始以为是vpn的问题,折腾半天反复确认之后没有发现什么问题. 同时试过阿里巴巴的maven仓库,删除过以来,重新导过包发现都不行. 后来在idea的设置里 ...

  8. jenkins构建maven项目:找不到本地依赖包的解决办法

    前言: 我们在构建maven项目时,常常会用到一些特殊的jar包(不能在中央仓库中直接下载到本地仓库如微软不允许以maven的方式直接下载com.microsoft.sqlserver:sqljdbc ...

  9. bladex下载前端代码后,运行服务时报错【'vue-cli-service' 不是内部或外部命令,也不是可运行的程序或批处理文件。】的解决方法

    问题:E:\BladeXDB\Saber>yarn run serveyarn run v1.13.0$ vue-cli-service serve'vue-cli-service' 不是内部或 ...

随机推荐

  1. 《Java编程思想》笔记 第十七章 容器深入研究

    1 容器分类 容器分为Collection集合类,和Map键值对类2种 使用最多的就是第三层的容器类,其实在第三层之上还有一层Abstract 抽象类,如果要实现自己的集合类,可以继承Abstract ...

  2. qt include_directories没用

    include_directories之后在.cpp文件中include.h文件没有路径补全说明qt没有找到该.h文件 问题解决: 在add_executable里加入那个.cpp文件就可以了 因为c ...

  3. 【转】C#获取当前程序运行路径的方法集合

    //获取当前进程的完整路径,包含文件名(进程名).string str = this.GetType().Assembly.Location;result: X:\xxx\xxx\xxx.exe (. ...

  4. 安卓长按交互onCreateContextMenu的简单 用法

    1.可在activity和fragment中使用. 2.使用方法 (1)注册 registerForContextMenu(btn);//btn是要实现交互的控件 (2)重写onCreateConte ...

  5. Codeforces 1039A. Timetable

    题目地址:http://codeforces.com/problemset/problem/1039/A 题目的关键在于理清楚思路,然后代码就比较容易写了 对于每一个位置的bus,即对于每一个i(i& ...

  6. sum (bestcoder)

    sum Accepts: 640 Submissions: 1744 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/13107 ...

  7. Swift中获取相册图片与保存到相册

    关于这个网上目前位置记录的资料比较少,记录一下这个坑 获取相册图片 1: var iPC = UIImagePickerController() 2: iPC.sourceType = UIImage ...

  8. java通过Comparable接口实现字符串比较大小排序的简单实例

    /** * 对象比较大小compare的用法 字符串排序 * 练习代码, 给定字符串" nba" "cba" "ncaa" "wb ...

  9. WebService authentication

    http://blog.csdn.net/largestone_187/article/details/5734632 通过SoapHeader对用户口令进行验证,只有授权的用户才可以使用接口.确保了 ...

  10. coco2dx-2.2.2 win32启动过程(opengl 和 窗口大小初始化部分) - 学习笔记 1

    因为最近要做不同分辩率的适配,所于看了下引擎这方面的代码,记录一下当是学习笔记,cocos2d-x 版本 2.2.2 , 例子是samples\Cpp\TestCpp下的 TestCpp. 先看下ma ...