Hey!
Welcome to the Auth0 by Okta Community.
The error you are receiving looks like it is coming from a require() statement to import the node-fetch package and is most likely coming from an action you are using in your tenant. The Fetch API is supported natively, so you don’t need to require it in the action. Removing that require() statement will most likely resolve the error you are encountering.
There is another error you may run into after this one has been resolved. The scopes you are using are not available with the Client Credentials flow. The openid, email, and email scopes can only be used when an ID Token is passed back to the application, and the Client Credentials flow is only returning an Access Token. The offline_access scope is unnecessary because you can enable offline access in your tenant’s API settings. With that said, the Client Credentials flow ignores all scopes passed by the parameters and returns all scopes granted to that application. You can review another community post similar to this one here.