zoukankan      html  css  js  c++  java
  • sass-loader安装+Failed to resolve loader: sass-loader You may need to install it.解决方法

    方式一:

    通过 cnpm 安装node-sass

     cnpm install node-sass --save 

    方式二:

    通过npm 安装

            1、安装sass-loader

     npm install sass-loader --save-dev 

            2、安装 node-sass

     npm install node-sass --save-dev

            如若不安装node-sass ,会出现如下错误:

    ERROR  Failed to compile with 1 errors                                                                                                                                              3:13:52 PM
     error  in ./src/styles/index.scss
     Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
     Error: Cannot find module 'node-sass'
         at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
         at Function.Module._load (internal/modules/cjs/loader.js:562:25)
         at Module.require (internal/modules/cjs/loader.js:692:17)
         at require (internal/modules/cjs/helpers.js:25:18)
         at getDefaultSassImplementation (D:WebStormProject	ourism-supervision-service-platform
    ode_modulessass-loaderdistgetDefaultSassImplementation.js:24:10)
         at getSassImplementation (D:WebStormProject	ourism-supervision-service-platform
    ode_modulessass-loaderdistgetSassImplementation.js:19:72)
         at Object.loader (D:WebStormProject	ourism-supervision-service-platform
    ode_modulessass-loaderdistindex.js:40:61)
     @ ./src/styles/index.scss 4:14-225 14:3-18:5 15:22-233
      @ ./src/main.js
      @ multi (webpack)-dev-server/client?http://localhost:9999/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
  • 相关阅读:
    基于FPGA的均值滤波算法实现
    QuartusII 13.0 PLL IP Core调用及仿真
    varnish-4.x VCL之grace mode
    varnish-4.x VCL之cookie及缓存时间
    varnish-4.x VCL之强制cache miss
    Mariadb-Galera10二进制包安装
    MariaDB Replication
    MariaDB 使用CONNECT存储引擎
    MariaDB 使用TokuDB存储引擎
    Ubuntu启用VNC服务的配置
  • 原文地址:https://www.cnblogs.com/xuxiaoyu/p/13283151.html
Copyright © 2011-2022 走看看