iView 是微信团队开发的一套高质量的微信小程序 UI 组件库,在 github 上可以直接下载源码使用,但是在 npm install
安装依赖时会有 ReferenceError: internalBinding is not defined
报错。
然后在 github 上的 issues 中找到 相关解决方案
到 npm 网站找到 natives 相关描述
Do stuff with Node.js’s native JavaScript modules
我们在项目目录中安装 更新 natives 1.1.6的版本
npm install natives@1.1.6
成功之后就直接安装依赖
编译组件
在 微信开发者工具 中打开 examples 文件夹就可以看到编译好的 iView weapp了