-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth0 cli dependencies error #874
Comments
@Gentracker1 can you reproduce this locally? Or only on lambda? If only on lambda, are you using the default image for AWS Node? If not, is it an image we can use to reproduce? I did write a small test to try it locally and couldn't reproduce the error. I'm trying to get as close to your setup as possible. The lambda environment is my main unknown. I'm happy to dig in more if you could get me that info. |
Updated with the more info and updated the auth0/auth0-cli to the latest version. The error with the latest version is at npm run build. We are using the WSL Ubuntu with AWS CDK, |
@m3talsmith I have updated the error desc, we are using the latest auth0-cli. |
@Gentracker1 I was able to reproduce the |
@Gentracker1 what happens if you add this to your dependencies:
|
Thanks @m3talsmith . |
Found a similar error for "hexoid" is not a function here: auth0/node-auth0#798 |
Overriding the
Not an ideal solution to override dependencies though. |
Tracking down hexoid and superagent errors now @Gentracker1 and @matthewhgentrack |
This definitely comes down to transitive dependencies of node-auth. Specifically, it comes down to formidable via superagent as @matthewhgentrack points out. A workaround seems to be to downgrade superagent or save the latest formidable to your npm packages. |
The fix is simple: Don't add add an old promise-batcher version to your direct dependencies. Do an override of the peer dependency itself: |
Checklist
Description
Hello,
We are using auth0-cli as a node-module to export the data. We have tried with [7.20.0][7.19.0]....[7.11.0] versions, but same error.
Environment
WSL on windows, Ubuntu-22.04
Node v18.16.0
Using Typescript Version 4.9.5
Using Auth0-cli in AWS Lambda (import { dump } from 'auth0-deploy-cli';)
Package.json
"auth0": "4.0.1",
"auth0-deploy-cli": "7.20.0"
Lambda code
import {
Connection,
ManagementClient,
PostUsersExportsRequest,
GetOrganizationMemberRoles200ResponseOneOfInner,
} from "auth0";
import { dump } from 'auth0-deploy-cli';
//start dump clients
dump({
output_folder: '/tmp/auth0-config/export/directory"',
format: 'directory',
config: {
AUTH0_DOMAIN: secrets.domain,
AUTH0_CLIENT_ID: secrets.client_id,
AUTH0_CLIENT_SECRET: secrets.client_secret,
},
})
.then(() => {
console.log('Auth0 configuration export successful');
})
.catch((err) => {
console.log('Error during Auth0 configuration export:', err);
});
//end dump
Steps:
npm install
npm run build
"build": npm run functions:build,
"functions:build": "tsc -p functions",
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs.NodejsFunction.html
Node.js Lambda function bundled using esbuild.
suhailt@GTKNZ072:~/Project/platform-auth0$ npm run build
node_modules/promise-pool-executor/index.d.ts:5:31 - error TS2305: Module '"promise-batcher"' has no exported member 'BatcherToken'.
5 export { BATCHER_RETRY_TOKEN, BatcherToken, BatchingResult } from "promise-batcher";
~~~~~~~~~~~~
Found 1 error in node_modules/promise-pool-executor/index.d.ts:5
`
Expectation
Able to deploy the lambda with the auth0-cli.
Reproduction
With node Node v18.16.0
Using Typescript Version 4.9.5
Use the latest 7.20.0
Deploy the AWS lambda
npx cdk deploy
Deploy CLI version
7.20.0
Node version
v18.16.0
The text was updated successfully, but these errors were encountered: