新项目开发需要安装依赖,但是安装完之后通过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. 微信小程序 --- 绘画

    cavans及context详解 绘画API的使用 游戏的制作

  2. Linux系列-Xshell连接本地VMware安装的Linux虚拟机

    一.安装VMwareWorkstation并安装RedHat虚拟机,这里安装步骤省略,网络的资料很多,大侠们不如百度或者谷歌一下,大把的资料. 二.打开本地电脑的“网络连接”,你会发现多出了2个网络适 ...

  3. 我见过的最完善的log4net配置

    Log4net的优点: 几乎所有的大型应用都会有自己的用于跟踪调试的API.因为一旦程序被部署以后,就不太可能再利用专 门的调试工具了.然而 一个管理员可能需要有一套强大的日志系统来诊断和修复配置上的 ...

  4. Go Configure Support hot reloading.

    Go Configure – Josh Betz https://josh.blog/2017/04/go-configure Go Configure APRIL 27, 2017 # DEVELO ...

  5. This module embeds Lua, via LuaJIT 2.0/2.1, into Nginx and by leveraging Nginx's subrequests, allows the integration of the powerful Lua threads (Lua coroutines) into the Nginx event model.

    openresty/lua-nginx-module: Embed the Power of Lua into NGINX HTTP servers https://github.com/openre ...

  6. 二.re库介绍

    一.re库的主要功能函数 1.re.search()用法 2.re.match()的用法 >>> match=re.match(r'[1-9]\d{5}','BIT 100081') ...

  7. android 模仿今日头条ViewPager+TabLayout

    导入依赖库: compile 'com.android.support:design:25.3.1' 1.fg_content_demo2.xml <?xml version="1.0 ...

  8. 3.mysql自增的字段如何重新派逊

    alter table sales drop id;ALter table sales add id int(6) PRIMARY key not null auto_increment FIRST;

  9. linux/Mac使用du查看目录占用的磁盘大小

    [1]du命令用来查看目录或文件所占用磁盘空间的大小.常用选项组合为: du -sh [2]若要查看一个目录下每个文件和文件夹的磁盘占用空间,使用如下命令: du -ah --max-depth=1 ...

  10. And Design:拓荒笔记——Form表单

    And Design:拓荒笔记——Form表单 Form.create(options) Form.create()可以对包含Form表单的组件进行改造升级,会返回一个新的react组件. 经 For ...