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,但是我都是安装了啊
你这-g都是全局安装的,需要在项目目录下安装