在azure 32bit上安装nodejs sharp

我正在尝试将一个node.js项目部署到Azure Web Apps(免费层),并且它的一个依赖项是尖锐的: https : //github.com/lovell/sharp

在进行部署过程中,我得到:

ERROR: Intel Architecture 32-bit systems require manual installation - please see http://sharp.dimens.io/en/stable/install/ gyp: Call to 'node -e "require('./binding').download_vips()"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (D:\Program Files (x86)\npm\3.10.3\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) 

我尝试运行在线Azure控制台中的锐利文档上列出的命令curl -s https://raw.githubusercontent.com/lovell/sharp/master/preinstall.sh | sudo bash - curl -s https://raw.githubusercontent.com/lovell/sharp/master/preinstall.sh | sudo bash - (我在尝试之前删除了sudo ,因为Azure不喜欢这样)。 但是我得到一个错误:

 /usr/bin/bash: line 91: type: pkg-config: not found (23) Failed writing body 

所以没有任何工作。 不幸的是,我无法将我的环境切换到x64,因为看起来免费层用户仅限于32位环境。 任何方式,我可以得到这个工作?

谢谢!

尽pipe大多数模块都是纯文本JavaScript文件,但某些模块是特定于平台的二进制映像。 这些模块在安装时通常通过使用Python和node-gyp进行编译。Azure App Service不支持所有本机模块,并且在编译具有特定先决条件的模块时可能会失败。

描述来自https://azure.microsoft.com/en-us/documentation/articles/nodejs-use-node-modules-azure-apps/

您可以在本地环境的windows 32平台上安装sharp,然后使用包含已编译模块的node_modules文件夹将应用程序部署到Azure。

你可以参考https://github.com/lovell/sharp/issues/379在32位Windows环境下安装sharp模块。