Auth0-deploy-cli as Node Module not Working as Expected
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
- auth0-deploy-cli
- Ensure the latest version of "auth0-deploy-cli" is installed for the project (run in the project directory):
npm install -g auth0-deploy-cli
- Additionally, check the latest stable version of Node is installed locally:
- Using MacOS/Brew:
brew install node
or to updatebrew upgrade node
- For other platforms, check the Node install page: https://nodejs.org/en/download/
- Using the "auth0-deply-cli" as a Node module with the proxy functionality: