安装less-loader一直出现问题

来源:4-5 使用 less 和 sass

carolcoral

2017-09-27 11:56

E:\WWW\webpackdemo>npm i less@2.3.1 -g
C:\Users\Carol\AppData\Roaming\npm\lessc -> C:\Users\Carol\AppData\Roaming\npm\node_modules\less\bin\lessc
C:\Users\Carol\AppData\Roaming\npm
`-- less@2.3.1
  +-- graceful-fs@3.0.11
  | `-- natives@1.1.0
  +-- image-size@0.3.5
  +-- promise@6.1.0
  | `-- asap@1.0.0
  `-- source-map@0.2.0
    `-- amdefine@1.0.1


E:\WWW\webpackdemo>npm i less-loader -g
C:\Users\Carol\AppData\Roaming\npm
+-- UNMET PEER DEPENDENCY less@^2.3.1
+-- less-loader@4.0.5
`-- UNMET PEER DEPENDENCY webpack@^2.0.0 || ^3.0.0

npm WARN less-loader@4.0.5 requires a peer of less@^2.3.1 but none was installed.
npm WARN less-loader@4.0.5 requires a peer of webpack@^2.0.0 || ^3.0.0 but none was installed.



一直说我没有安装less和webpack,但是我都是安装了啊

写回答 关注

1回答

  • 慕勒7123956
    2017-11-08 17:40:49

    你这-g都是全局安装的,需要在项目目录下安装

webpack深入与实战

webpack实战教程,用真实项目带你探索 webpack 强大的功能

86561 学习 · 721 问题

查看课程

相似问题