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

util.inherits is not a function #902

Open
2 tasks
11003 opened this issue May 28, 2024 · 0 comments
Open
2 tasks

util.inherits is not a function #902

11003 opened this issue May 28, 2024 · 0 comments

Comments

@11003
Copy link

11003 commented May 28, 2024

NOTE: Please test in a least two browsers (i.e. Chrome and Firefox). This
helps with diagnosing problems quicker.

Setup

Please provide the following details, the more info you can provide the
better.

Operating System:
Node Version: <v20.13.1>
web-push Version: <^3.6.7>

Please select any browsers that you are experiencing problems with:

  • [ - ] Chrome
  • [ - ] Firefox
  • [ - ] Opera for Android
  • Samsung Internet Browser
  • Other
async function onNotify1() {
	// VAPID keys should be generated only once.
	const webPush = await import('web-push')
	webPush.setGCMAPIKey('AIzaSyDNlm9R_w_0FDGjSM1fzyx5I5JnJBXACqU')
	// This is the same output of calling JSON.stringify on a PushSubscription
	const pushSubscription = {
		endpoint: '.....',
		keys: {
			auth: '.....',
			p256dh: '.....'
		}
	}

	webpush.sendNotification(pushSubscription, 'Your Push Payload Text')
}

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant