Skip to content
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

Module not found: Can't resolve 'v8' #475

Closed
developdeez opened this issue Mar 3, 2022 · 2 comments
Closed

Module not found: Can't resolve 'v8' #475

developdeez opened this issue Mar 3, 2022 · 2 comments

Comments

@developdeez
Copy link

I keep getting an error (Module not found: Can't resolve 'v8') when I use the Issuer. Seems to happen even if I use the google issuer and I recently updated my node to see if its a version issue. Same error.

openid-client 5.1.3
in NextJS

`const { Issuer, Strategy } = require('openid-client');
class OidcConnector extends Connector {
constructor(settings) {
super('oidc', {
issuer: settings.issuer,
clientId: settings.clientId,
clientSecret: settings.clientSecret,
publicKey: settings.publicKey,
redirectUri: settings.redirectUri,
sessionSecret: settings.sessionSecret || 'Secret',
selectProfileData: settings.selectProfileData,
findOrCreateProfile: settings.findOrCreateProfile
});
}

async initialize() {
this.issuer = new Issuer({
issuer: 'https://accounts.google.com',
});

const client = new this.issuer.Client({
  clientId: 'cid',
  clientSecret: 'csec',
  redirect_uri: 'localhost:3000'
});

}

module.exports = OidcConnector;

`

@panva
Copy link
Owner

panva commented Mar 3, 2022

This is a Node.js runtime only library.

#442

cc @balazsorban44 who can point you in the right direction.

@panva panva closed this as completed Mar 3, 2022
@balazsorban44
Copy link

balazsorban44 commented Mar 4, 2022

@developdeez as said above, you are likely using this library in a non-Node.js environment, something like Cloudflare Workers maybe? Could you share your repository or a more elaborate reproduction?

@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants