Auth0-deploy-cli as Node Module not Working as Expected

Overview

The library Auth0-deploy-cli does not work when used as a Node Module and returns with very little to no response back to the CLI.

For example, if the following code is run:
 

import { dump } from 'auth0-deploy-cli';

dump({
  output_folder: './local',
  format: 'yaml',
  config: {
    AUTH0_DOMAIN: '<YOUR_AUTH0_TENANT_DOMAIN>',
    AUTH0_CLIENT_ID: '<YOUR_AUTH0_CLIENT_ID>',
    AUTH0_CLIENT_SECRET: '<YOUR_AUTH0_CLIENT_SECRET>',
  },
    debug: true,
    env: true
})
  .then(() => {
    console.log('Auth0 configuration export successful');
  })
  .catch((err) => {
    console.log('Error during Auth0 configuration export:', err);
  });


The returned data shows either nothing or:

2024-01-22T12:41:05.132Z - info: Creating undefined

Applies To
  • auth0-deploy-cli
Cause
The most likely cause is an old version of either the "auth0-deploy-cli" tool or an old version of Node installed locally.
Solution
  1. Ensure the latest version of "auth0-deploy-cli" is installed for the project (run in the project directory):

npm install -g auth0-deploy-cli

  1. Additionally, check the latest stable version of Node is installed locally:
  1. Using the "auth0-deply-cli" as a Node module with the proxy functionality:
This is a reported bug that is currently being addressed here.

Recommended content

No recommended content found...