每当我执行pm2时,在ec-2实例上,我收到消息......
Spawning PM2 daemon with pm2_home=<home_dir>/.pm2
Run Code Online (Sandbox Code Playgroud)
出现这种情况有pm2 info,pm2 list,pm2 -h等.
裸露pm2会显示帮助.
我可以从中获得更多回复sudo -i.
似乎有些事情阻止了PM2在非sudo时妖魔化.
我正在使用贝宝按钮 SDK。激活按钮的代码是:-
paypal.Buttons({
createOrder: ( data, actions ) => {
return actions.order.create({
purchase_units: [{
amount: {
value: this.amount.toFixed(2),
currency_code: "GBP",
}
}]
})
},
onApprove: ( data, actions ) => {
return actions.order.capture().then(details => {
console.log('details',details);
})
},
onError: ( error ) => {
console.log('error',error);
}
}).render('#paypal-button-container')
Run Code Online (Sandbox Code Playgroud)
用户界面按预期运行,然后在返回错误之前有很长时间的暂停。脚本标签中使用的 client_id 用于沙箱帐户。我找不到描述错误可能原因的文档......
error Error: Order could not be captured
非常感谢任何建议。
贝宝.. https://developer.paypal.com/docs/checkout/integrate/#1-get-paypal-rest-api-credentials
我已经使用以下命令安装了 pm2
npm install pm2@latest -g
这工作正常,我现在正在运行使用 pm2 的生产服务。
我退出了 shell ( AWS ),现在如果我尝试,pm2 list我会收到错误:-
pm2: command not found
我认为问题可能是我应该跑sudo npm install pm2@latest -g
从之前的 stackoverflow 答案中我可以看到这是建议的方法,但我的问题是......
如果我现在运行,sudo npm install pm2@latest -g这会影响我当前运行的 pm2 服务吗?
谢谢