项目git clone下来之后,运行npminstall, npm start报错代码如下:

ERROR in ENOENT: no such file or directory, scandir 'E:\React\helloworld\node_modules\node-sass\vendor'
@ ./src/layouts/CoreLayout/CoreLayout.scss 4:14-284 13:2-17:4 14:20-290

其原因是windows下的node-sass编译没通过,需要下载微软的编译环境及工具,但也有直接解决方案:

方案一、

  • 创建目录E:\React\helloworld\node_modules\node-sass\vendor
  • 再次运行npm start,查看报错如下
ERROR in Missing binding E:\React\react-redux-starter-kit-go\node_modules\node-sass\vendor\win32-x64-47\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 5.x
  • 去https://github.com/sass/node-sass/releases下载对应版本的node-sass的binding.node,比如我这里就要下载
win32-x64-47_binding.pdb
  • 将该文件改名放到E:\React\react-redux-starter-kit-go\node_modules\node-sass\vendor\win32-x64-47\binding.node

方案二、

  • 使用https://npm.taobao.org 阿里的镜像安装

npm方式:

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

yarn方式:

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

关于 windows 下 node_modules\node-sass\vendor 的报错解决方法的更多相关文章

  1. 解决Windows下运行php Composer出现SSL报错的问题

    解决Windows下运行php Composer出现SSL报错的问题 2015-01-14 20:05   在windows下运行composer却出现SSL报错: E:\www>php -f  ...

  2. windows下测试flask的例子tuorial报错flask KeyError: 'DATABASE'

    windows下测试flask的例子tuorial报错flask KeyError: 'DATABASE' flask KeyError: 'DATABASE' 提示是 变量 database错误 由 ...

  3. windows平台在tomcat中启动cas报错解决

    windows平台在tomcat中启动cas报错: Caused by: java.lang.UnsatisfiedLinkError: Could not load library. Reasons ...

  4. Windows下80端口被进程System占用的解决方法

    最近电脑时不时就发生了80端口被占用的情况,简单百度解决后,当重启电脑的时候又发生被占用的情况.今天非常幸运的是,发生了80端口和8080端口都被占用了情况,忍无可忍决定下定决心解决这个坑爹的问题,经 ...

  5. gulp/webpack运行sass报错解决方法

    帮同事安装gulp和webpack运行环境,使用cnpm install安装node-sass之后,运行项目总是报错,提示vendor目录不存在,几番百度之后,找到处理方法,这里记录一笔,防止以后遇到 ...

  6. 【cypress】2. 安装Cypress(windows系统),以及cypress open报错解决。

    安装cypress. 一.操作系统 先确认下你的系统,是否在cypress支持范围之内: macOS 10.9 以上 (仅64-bit) Linux Ubuntu 12.04及以上版本,Fedora ...

  7. sass注释中有中文出现报错解决方法

    在使用koala编译sass成css过程中出现这样的报错 后来查资料说是自己在sass中的注释中有中文引起的, 解决方案: 进入C:\Ruby25-x64\lib\ruby\gems\2.5.0\ge ...

  8. Windows下安装Oracle拖慢开机速度的解决方法

    环境:win7 + oracle R2 方法:将安装Oracle后自动开机启动的服务改为手动启动 步骤如下: 1.修改服务项 Ctrl + R,输入services.msc,打开服务列表,找到Orac ...

  9. windows 下编辑shell,到linux报错,也是windows换行等造成

    sed -i 's/\r$//' shell.sh 然后linux 下就不会报语法错误了.

随机推荐

  1. mysql datatime 设置默认值为CURRENT_TIMESTAMP报错`Invalid default value`

    环境: Ubuntu mysql 5.5 解决方法: 升级mysql至5.6 apt-cache search mysql-server sudo apt-add-repository ppa:ond ...

  2. gulp基本介绍

    一.gulp是什么 gulp就是用来机械化的完成重复性质(如less->css:js.css压缩:js混淆)的工作:gulp的机制就是将重复工作抽象成一个个的任务. 二.gulp使用 a.首先确 ...

  3. 51nod1118(水题)

    题目链接: https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1118 题意: 中文题诶~ 思路: 因为机器人只能往下或者右 ...

  4. Linux虚拟机添加新硬盘的全程图解

    查看网的文章,我将在vm虚拟机LinuxRedhat中添加一个新的硬盘, 过程大致如下: 1.选择"VM"----"setting"并打开,将光标定位在hard ...

  5. SpringBoot实战配置

    http://blog.csdn.net/sun_t89/article/details/51944252 http://www.cnblogs.com/kreo/p/4423362.html

  6. [LeetCode] Remove Linked List Elements

    Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --& ...

  7. android解析json

    android2.3提供的json解析类 android的json解析部分都在包org.json下,主要有以下几个类: JSONObject:可以看作是一个json对象 JSONStringer:js ...

  8. mac系统下mysql开机启动总是3307

    修改了mysql的my.cnf可还是不行,启动后就是3307,必须关掉再启动. 觉得可能是mac系统在哪里写死了开机启动项. http://queforum.com/mysql/1012987-mys ...

  9. NOIp #2009

    http://files.cnblogs.com/files/radiumlrb/NOIP2009%E6%8F%90%E9%AB%98%E7%BB%84%E5%A4%8D%E8%B5%9B%E8%AF ...

  10. HDU 3743 Frosh Week (线段树+离散化)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3743 Frosh Week Time Limit : 2000/1000ms (Java/Other) ...