When running the code from the example (with the for loop removed), here's an exact copy of the code I'm running:
require('dotenv').config();
const proxmoxApi = require("proxmox-api");
// authorize self signed cert if you do not use a valid SSL certificat
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
async function test() {
// connect to proxmox
const promox = proxmoxApi({host: process.env.HOST, password: process.env.PASSWORD, username: process.env.USER});
// list nodes
const nodes = await promox.nodes.$get();
console.log(nodes)
}
test().catch(console.error);
But when I run this code I get this error:
TypeError: proxmoxApi is not a function
When running the code from the example (with the for loop removed), here's an exact copy of the code I'm running:
But when I run this code I get this error:
TypeError: proxmoxApi is not a function