新项目开发需要安装依赖,但是安装完之后通过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报错的更多相关文章

  1. 解决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 ...

  2. 解决Error: ENOENT: no such file or directory, scandir 'xxx\node-sass\vendor'

      解决方案是执行以下方法: npm rebuild node-sass

  3. 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 ...

  4. 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\ ...

  5. 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 ...

  6. throw er; // Unhandled 'error' event&Error: ENOENT: no such file or directory,

    今天做一个文件上传的项目时, 用express-formidable往硬盘里面存文件时, 报  ENOENT:no such file or directory 原因就是程序不能像别的语言一样不存在就 ...

  7. 小程序问题集:保存失败:Error: ENOENT: no such file or directory, open

    问题如图: 当编译的时候 会提示找不到这个文件(index),但是确信项目目录里已经删除了该页面路径,并且app.json的pages列表中也没有该页面:   这时候需要看一下当前已经打开的文件中是否 ...

  8. 解决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 ...

  9. 报错:Error: ENOENT, no such file or directory 'c:\Users\Administrator\WebstormProjects\blogtest\views\footer.ejs'

    这是我在index上引用<%- include footer %>,找不到该文件 所以报错 建立文件footer.ejs

随机推荐

  1. SpringMVC XXX-servlet.xml ApplicationContext.xml

    因为直接使用了SpringMVC,所以之前一直不明白xxx-servlet.xml和applicationContext.xml是如何区别的,其实如果直接使用SpringMVC是可以不添加applic ...

  2. Git的配置和使用

    eclipse中Git的配置 可以参考http://www.cnblogs.com/zhxiaomiao/archive/2013/05/16/3081148.html, http://blog.cs ...

  3. 树链剖分-点的分治(链的点的个数为k的点对数)

    hdu4760 Cube number on a tree Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65535/65535 ...

  4. oracle权限赋予

    上节讲的创建的software用户能否访问其他用户的表呢 1,创建software用户,密码设置为system create user software identified by system 2, ...

  5. POI3的资料整理

    转自http://aman.cao.blog.163.com/blog/static/32951336201010823557408/ POI3的资料整理一.POI简介 Jakarta POI 是ap ...

  6. lampp and testrail

    https://wyzx.testrail.net szllq2000 http://129.0.1.228/testrail/ http://docs.gurock.com/testrail-adm ...

  7. UVA796 - Critical Links(Tarjan求桥)

    In a computer network a link L, which interconnects two servers, is considered critical if there are ...

  8. COURSES---poj1469 hdu1083(最大匹配)

    题目链接:http://poj.org/problem?id=1469   http://acm.hdu.edu.cn/showproblem.php?pid=1083 题意:有n个学生p门课, 每门 ...

  9. My Emacs Writing Setup

    My Emacs Writing Setup Table of Contents 1. About this Document 1.1. Related Materials 1.2. Change H ...

  10. python提取相对路径

    原理: 用绝对路径,截断根目录的路径,就得到了相对路径. 代码 方法1:字符串替换(用字符串函数)推荐 import os print('==========1===========') abspat ...