mongodb 拼接函数在使用节点模块时出错 @jimp

mongodb stitch function is having error in using node modeule @jimp

我在数据库触发器上使用 mongodb 拼接功能,使用节点 js jimp 模块 https://www.npmjs.com/package/jimp

从 URL 读取图像

我已将 jimp 作为外部依赖项上传到 stitch 函数。 下面是我在函数

中使用的代码
const jimp = require('jimp');
const imageUrl = "https://images.unsplash.com/photo-1537454959372-885b35677ef5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80";
let image2 = await jimp.read(imageUrl);  

执行函数时出现以下错误

Error:
failed to execute source for 'jimp': failed to execute source for 'node_modules/jimp/dist/@jimp/custom': failed to execute source for 'node_modules/@jimp/custom/dist/@jimp/core': failed to execute source for 'node_modules/@jimp/core/dist/utils/mime': failed to execute source for 'node_modules/@jimp/core/dist/utils/core-js/modules/es.array.includes': TypeError
    at defineProperty (<native code>)
    at <anonymous>:6:12670
    at defineProperty (node_modules/core-js/internals/typed-array-constructor.js:87:11)
    at node_modules/core-js/internals/create-non-enumerable-property.js:12:10
    at node_modules/core-js/internals/redefine.js:34:35
    at node_modules/core-js/internals/export.js:60:5
    at node_modules/core-js/modules/es.array.includes.js:16:1
    at node_modules/@jimp/core/dist/utils/mime.js:9:1
    at node_modules/@jimp/core/dist/index.js:160:36
    at node_modules/@jimp/custom/dist/index.js:44:37
    at node_modules/jimp/dist/index.js:14:38 

看起来 jimp 正在使用 Array.prototype.includes

拼接功能暂不支持

Functions currently do not support the following ES6+ features:

 - New Global Object Types (i.e. WeakMap, Set, WeakSet, Symbol, Proxy)
 - New Math, Number, String, Array, and Object APIs (e.g.   
   Array.prototype.includes)

参考:https://docs.mongodb.com/stitch/functions/