解决Error: ENOENT: no such file or directory, scandir 安装node-sass报错
新项目开发需要安装依赖,但是安装完之后通过gulp运行项目,产生了一下的报错:

解决方案是执行一些方法:
npm rebuild node-sass
可是有时就是网络问题导致上面命令安装失败,查下失败提示,有可能是:
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-48_binding.node":
然后下面就是nodejs给你的暗示
========暗示========= Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=http://example.com:1234 or configure npm proxy via npm config set proxy http://example.com:8080 > node-sass@4.5.3 postinstall K:\mypro\nodePro\node_modules\_node-sass@4.5.3@node-sass ========暗示=========
意思就是说下载这个链接失败,你可以直接在浏览器打开这个链接(应该也打不开,或者特别慢),到这里我只能说你要翻墙了,上面也暗示你翻墙了。
翻墙后再试试几次npm rebuild node-sass
还是不行也要想办法把win32-x64-48_binding.node文件下载下来,win32-x64-48_binding.node到手后,打开项目下面的路径node_modules\_node-sass_node-sass@4.5.3@node-sass\vendor (上面暗示的最后一句就有,版本号可能不一样)。
然后在vendor文件夹下面创建win32-x64-48(要对应版本)文件夹,win32-x64-48文件夹下面放binding.node(文件名去掉前面的win32-x64-48_)
然后再一次命令: npm rebuild node-sass
应该安装成功
可能出错问题:
Testing binary
Binary has a problem: Error: %1 is not a valid Win32 application.
解决方法就是打开项目下面路径 node_modules\_node-sass_node-sass@4.5.3@node-sass\vendor\win32-x64-48文件夹,把里面的binding.node文件替换新下载的.
解决Error: ENOENT: no such file or directory, scandir 安装node-sass报错的更多相关文章
- 解决Error: ENOENT: no such file or directory, scandir 'D:\IdeaWork\code-front-jet\node_modules\.npminstall\node-sass\3.7.0\node-sass\vendor'
在使用npm安装node-sass的时候,可能会出现如下的报错: Error: ENOENT: no such file or directory, scandir 'D:\IdeaWork\code ...
- 解决Error: ENOENT: no such file or directory, scandir 'xxx\node-sass\vendor'
解决方案是执行以下方法: npm rebuild node-sass
- node开发遇到类似:Error: ENOENT: no such file or directory, scandir 'D:\work\taro-components- ....... _node-sass@4.12.0@node-sass\vendor
唯一的有参考价值的文章,https://www.cnblogs.com/milo-wjh/p/9175138.html 我可以负责任的说,以下的方法, npm rebuild node-sass 80 ...
- gitbook build/serve 失败,Error: ENOENT: no such file or directory, stat ...
我使用的 gitbook 版本 CLI version: 2.3.2 GitBook version: 3.2.3 在使用 gitbook 生成文档时,发现编译偶尔不规律性地出现错误 d:\Mine\ ...
- ionic cordova platform add android Cordova failed to install plugin Error: ENOENT: no such file or directory AndroidManifest.xml
问题描述: 在ionic 项目中出现编译android 的时候 出现 Cordova failed to install plugin Error: ENOENT: no such file or ...
- throw er; // Unhandled 'error' event&Error: ENOENT: no such file or directory,
今天做一个文件上传的项目时, 用express-formidable往硬盘里面存文件时, 报 ENOENT:no such file or directory 原因就是程序不能像别的语言一样不存在就 ...
- 小程序问题集:保存失败:Error: ENOENT: no such file or directory, open
问题如图: 当编译的时候 会提示找不到这个文件(index),但是确信项目目录里已经删除了该页面路径,并且app.json的pages列表中也没有该页面: 这时候需要看一下当前已经打开的文件中是否 ...
- 解决Errno::ENOENT: No Such File or Directory - Jekyll ~ Octopress and El Capitan
参考http://schalkneethling.github.io/blog/2015/10/16/errno-enoent-no-such-file-or-directory-jekyll-oct ...
- 报错:Error: ENOENT, no such file or directory 'c:\Users\Administrator\WebstormProjects\blogtest\views\footer.ejs'
这是我在index上引用<%- include footer %>,找不到该文件 所以报错 建立文件footer.ejs
随机推荐
- reflect 机制
1: Class.forName的作用?为什么要用? 答:调用该访问返回一个以字符串指定类名的类的对象. 2: 通过反射,有几种方法可以实例化Class类对象? 3种,第一种:Class.forNam ...
- mongodb基础应用
一些概念 一个mongod服务可以有建立多个数据库,每个数据库可以有多张表,这里的表名叫collection,每个collection可以存放多个文档(document),每个文档都以BSON(bin ...
- Oracle数据库误删文件导致rman备份报错RMAN-06169解决办法
Oracle数据库误删文件导致rman备份报错RMAN-06169解决办法 可能是误删文件导致在使用rman备份时候出现以下提示 RMAN-06169: could not read file hea ...
- RGBA HSB opengl光照模型
RGBA HSB HSV颜色模型对应于画家的配色的方法.画家用改变色浓和色深的方法来从某种纯色获得不同色调的颜色.其做法是:在一种纯色中加入白色以改变色浓,加入黑色以改变色深,同时加入不同比例的白 ...
- cookie.setPath()的用法
正常的cookie只能在一个应用中共享,即:一个cookie只能由创建它的应用获得. 可在同一应用服务器内共享cookie的方法:设置cookie.setPath("/"); ( ...
- (windows下)tomcat优化--内存,并发.缓存三方面优化
一.内存 注: jdk1.8中废弃了-XX:PermSize和-XX:MaxPermSize的持久态(存放常量.静态变量区)配置, 多了一个元数据区(Metadata Space:默认为内存的0.2% ...
- IOS 自己定义UITableView
依据不同须要,须要使用tableview的结构,可是里面每个cell,又须要自己的样式.所以学习了一下如何把自定义的cell加到tableview里面 首先要自己创建一个类,继承UITableView ...
- hadoop中map和reduce的数量设置
hadoop中map和reduce的数量设置,有以下几种方式来设置 一.mapred-default.xml 这个文件包含主要的你的站点定制的Hadoop.尽管文件名以mapred开头,通过它可以控制 ...
- POJ2992:Divisors(求N!因子的个数,乘性函数,分解n!的质因子(算是找规律))
题目链接:http://poj.org/problem?id=2992 题目要求:Your task in this problem is to determine the number of div ...
- C# 多线程编程第二步——线程同步与线程安全
上一篇博客学习了如何简单的使用多线程.其实普通的多线程确实很简单,但是一个安全的高效的多线程却不那么简单.所以很多时候不正确的使用多线程反倒会影响程序的性能. 下面先看一个例子 : class Pro ...