小程序版本
- 检查项目设置,设置调试基础库版本,顺便勾选 “使用 npm 模块”;

- 没有 node.js 的需要先安装 node.js;
- 在小程序根目录(类似 C:UsersUserWeChatProjectsminiprogram-1)按住 shift 点鼠标右键,“在此处打开 Powershell 窗口(S)”;

- 初始化
npm init

- 执行安装命令
npm i weui-miniprogram

- 工具 > 构建 npm

然后就可以使用了
快速上手 | 微信开放文档