Failed Login with Error "Cannot find module..."
Last Updated:
Overview
Cannot find module...
Applies To
- Node Module
- Actions
- Hooks
- Rules
Cause
Also, do not require a dependency with the version suffix in the code itself, as it can lead to versioning issues.
It is recommended to change the action code from:
const ManagementClient = require("auth0@4.3.1").ManagementClient;
toconst ManagementClient = require("auth0").ManagementClient;
The version of the Auth0 dependency is determined when adding the package to the action.
Solution
Follow the steps or video below.
Configure the Action to use a supported Node Module.
In actions, add the dependency following the steps described below:
1. Click on the Dependencies icon on the left side of the edit screen.
2. Click the Add Dependency button.
3. Enter the name and version of the dependency, for example:
The version may be left blank to add the latest supported version of the dependency.