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. Max-heap && Min-heap && push_heap

    最大堆:make_heap(vi.begin(),vi.end()) #include <iostream> #include <vector> #include <al ...

  2. hdu 5748(LIS)

    Bellovin Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total ...

  3. native,strictfp,transient,volatile什么java?

    1. native 簡單講,呼叫其他語言(c,c++之類)做出來的dll做法1.利用java做個介面供其他語言實作(也就是宣告成native)2.用javah產出.h:3.用其他語言實現native方 ...

  4. 移动APP 支付宝快捷支付开发流程

    [代码] [Java]代码 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ...

  5. mysql数据库设计之三范式

    第一范式: 第二范式:   正解: 第三范式: 示例: 正解: BC范式: 示例: 正解:

  6. Linux上安装Redis教程

    Redis的安装步骤: 步骤1.安装redis必须已经安装了gcc,如果没安装gcc 就使用命令 yum install -y gcc步骤2.下载redis包 下载地址:http://download ...

  7. .NET Core Runtime ARM32 builds now available

    原文地址:传送门 .NET Core Runtime ARM32 builds now available The .NET Core team is now producing ARM32 buil ...

  8. 来,让我们谈一谈 Normalize.css

    Normalize.css 只是一个很小的CSS文件,但它在默认的HTML元素样式上提供了跨浏览器的高度一致性.相比于传统的CSS reset,Normalize.css是一种现代的.为HTML5准备 ...

  9. Codeforces 1023 C.Bracket Subsequence-STL(vector) (Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Fi)

    C. Bracket Subsequence ... 代码: 1 //C 2 #include<iostream> 3 #include<cstdio> 4 #include& ...

  10. android 仿真器联网

    1.查看仿真器dns C:\Users\meng\AppData\Local\Android\Sdk\platform-tools>adb shell 再输入 getprop 2.查看仿真器的名 ...