我有 NestJs 应用程序,可以在我的本地机器(Windows)上完美运行。现在我想为我的应用程序创建一个 docker 容器。当我尝试启动我的容器时,我遇到了 Argon2 的一个问题。我在容器上安装了所有需要的氩气。我的错误在哪里?
谢谢
internal/modules/cjs/loader.js:1025
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: Error loading shared library /usr/src/app/node_modules/argon2/build/Release/argon2.node: Exec format error
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1025:18)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at load (/usr/src/app/node_modules/node-gyp-build/index.js:20:10)
at Object.<anonymous> (/usr/src/app/node_modules/argon2/argon2.js:5:81)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
Run Code Online (Sandbox Code Playgroud)
FROM node:12.13-alpine As development
WORKDIR /usr/src/app
COPY package*.json ./
# --no-cache: download package index on-the-fly, no need to cleanup afterwards
# --virtual: bundle packages, remove whole …Run Code Online (Sandbox Code Playgroud) 我正在尝试按照文档中的说明禁用交付,但它不起作用。 屏幕
文档:https ://developer.paypal.com/docs/api/orders/v2/#definition-order_application_context
createOrder: (data, actions) => {
return actions.order.create({
purchase_units: [
{
description: "global description",
items: [
{
name: "aaa",
quantity: 1,
unit_amount: { currency_code: "EUR", value: 10 }
},
{
name: "bbb",
quantity: 2,
unit_amount: { currency_code: "EUR", value: 10 }
}
],
amount: {
currency_code: "EUR",
value: 30,
breakdown: {
item_total: {
currency_code: "EUR",
value: 30
}
}
},
order_application_context: {
shipping_preference: "NO_SHIPPING"
}
}
]
});
Run Code Online (Sandbox Code Playgroud)
同样的问题:
application_context: {
shipping_preference: "NO_SHIPPING"
}
Run Code Online (Sandbox Code Playgroud)