zoukankan      html  css  js  c++  java
  • vue 启动vue项目时报错,npm ERR! Failed at the node-sass@4.14.1 postinstall script.

    vue 启动vue项目时报错,npm ERR! Failed at the node-sass@4.14.1 postinstall script.

    一.错误:

    在启动vue项目的时候报错

    报错信息如下:

    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-sass@4.14.1 postinstall script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    找不到sass,查看node-sass文件,里面没有文件。

    所以在npm install前设置sass源。

    二.解决方案:

    直接在当前目录下进行node-sass 的数据源设置

    npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass

    安装依赖:

    # 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题

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

    运行项目

    npm run dev

    安装依赖:
    # 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 npm install --registry=https://registry.npm.taobao.org
  • 相关阅读:
    [转载]MATLAB 图像处理命令
    html Window与document区别(轉)
    ICMP数据包结构(转)
    CString,string,char*之间的转换(转)
    word或dword区别
    VS2010 皮肤扩展
    Unicode _T和L和_TXET
    转:git 的常用命令
    git fetch 和 git pull 的区别
    mac git 命令自动补全
  • 原文地址:https://www.cnblogs.com/zlp520/p/14215019.html
Copyright © 2011-2022 走看看