wepy init standard my-project
[](()5. 切换至项目目录
cd myproject
[](()6. 安装依赖
npm install
[](()7. 开启实时编译
wepy build --watch
注意:这里有可能出现问题
peerDependencies WARNING wepy-compiler-less@^1.3.10 requires a peer of less@^3.8.1 but none was installed
Recently updated (since 2018-11-16): 2 packages (detail see file d:\study\xiaochengxu\wepystudy\my-empty-project\node_modules.recently_updates.txt)
找不到编译器:wepy-compiler-less。
解决方案:
- 在package.json中添加:
“resolutions”: {
“wepy-compiler-less/less”: “^3.8.1”
}
然后使用 yarn 安装依赖,之后用npm或者yarn都可以
- 使用yarn安装模块
和npm功能差不多,但比npm安装的速度更快一点;
步骤:
1:将yarn安装在全局: npm install yarn -g ;
2:安装完成后,查看当前版本号: yarn -v ;: