直接git clone weui小程序的项目,然后wepy build会出错。即使之前你运行npm install。
我是直接报:[WARNING] 找不到编译器:wepy-compiler-less。
解决方案不复杂:先npm install less 再 wepy build,一般就解决了。build的时候会自己安装wepy-compiler-less。
如果象我,还遇到下面的错误
npm WARN eslint-config-standard@7.1.0 requires a peer of eslint-plugin-promise@>=3.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN wepy-compiler-less@1.3.14 requires a peer of less@^3.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN wepy-weui-demo@1.0.0 No repository field.
+ wepy-compiler-less@1.3.14
updated 1 package and audited 7975 packages in 3.378s
found 10 vulnerabilities (7 low, 3 moderate)
这时候就需要根据提示:npm install -g eslint-plugin-promise@>=3.3.0,进行安装(其实上面也有说,是因为less没有安装)
这样的话,其实问题就都好解决