zoukankan      html  css  js  c++  java
  • 解决windows下node-sass报错的问题

    报错如下

    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\                                                                                                                                                             node_modules\npm\bin\npm-cli.js" "install"
    npm ERR! node v6.9.1
    npm ERR! npm  v3.10.8
    npm ERR! code ELIFECYCLE
    
    npm ERR! node-sass@4.5.3 postinstall: `node scripts/build.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-sass@4.5.3 postinstall script 'node scripts/build.js                                                                                                                                                             '.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the node-sass package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node scripts/build.js
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs node-sass
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls node-sass
    npm ERR! There is likely additional logging output above.
    
    npm ERR! Please include the following file with any support request:
    
    
    

    解决办法:
    主要是windows平台缺少编译环境,
    1、先运行: npm install -g node-gyp
    2、然后运行:运行 npm install –global –production windows-build-tools 可以自动安装跨平台的编译器:gym

    另外看到一篇好的文章,如果还没有解决,看看这个https://segmentfault.com/a/1190000005921721

    另外一篇https://github.com/lmk123/blog/issues/28

  • 相关阅读:
    安装devstack之配置proxy
    设备信息表项目
    好的运维工程师
    rhel 6.4 增加光盘为yum repo
    深度运维产品工具关键词
    坚持是一种能力
    书单 电影单 电视剧单
    三日不读书,便觉得言语无味,面目可憎
    STAR法则
    【断舍离】
  • 原文地址:https://www.cnblogs.com/junhey/p/7149781.html
Copyright © 2011-2022 走看看