2、wepy安装后提示Cannot read property 'addDeps' 参考自https://www.cnblogs.com/yuanchaoyong/p/116144
摘抄自https://www.cnblogs.com/yuanchaoyong/p/11614400.html
wepy安装步骤
$ npm install @wepy/cli -g # 全局安装 WePY CLI 工具 $ wepy init standard myproj # 使用 standard 模板初始化项目 $ cd myproj # 进入到项目目录 $ npm install # 安装项目依赖包 $ npm run dev # 监听并且编译项目
wepy build --watch运行后提示ERR Cannot read property 'addDeps' of undefined。
上面这是1.7.x的安装后运行进行以上提示,而我们安装的是2.x, git上已经更新安装方式,第一步 npm install @wepy/cli -g 更改为npm install @wepy/cli@next -g
1. npm install @wepy/cli@next -g 2. wepy init standard myproject 3. cd myproject 4. npm install 5. wepy build --watch
按照此步骤安装后运行结果
[16:17:21] info build app start...
[16:17:22] info app building App
[16:17:22] info component building components
[16:17:23] info component building components
[16:17:23] info component building components
[16:17:23] info vendor building vendor
[16:17:23] info assets building assets
[16:17:23] info build finished
[16:17:23] info watching...