- 当前 Bug 的表现(可附上截图)
返回结果:
Missing binding /var/user/node_modules/images/vendor/linux-x64-57/binding.node
imagescould not find a binding for your current environment: Linux 64-bit with Node.js 8.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 8.x
- Linux 64-bit with Node.js 8.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild images --force` to build the binding for your current environment.
日志:
END RequestId: d336b8a1-e327-11e8-a06f-525400e8849e
Report RequestId: d336b8a1-e327-11e8-a06f-525400e8849e Duration:9.773ms Memory:256MB MaxMemoryUsed:0.746094MB
- 预期表现
可以正常调用新安装的images库依赖中的方法
微信小程序开发问题解答
微信小程序开发者回答:
换了一个依赖的版本居然就好了,太奇怪了。
{
"name": "imageProcess",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"wx-server-sdk": "latest",
"images": "latest"
}
}
改成
{
"name": "imageProcess",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"wx-server-sdk": "latest",
"images": "2.2.1"
}
}
就好了
本文网址:http://www.91bianli.com/weixinxiaochengxu/38756.html