Skip to content

Support edge runtime #1525

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

Open
steebchen opened this issue Sep 22, 2024 · 0 comments
Open

Support edge runtime #1525

steebchen opened this issue Sep 22, 2024 · 0 comments
Assignees
Labels
api: logging Issues related to the googleapis/nodejs-logging API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@steebchen
Copy link

steebchen commented Sep 22, 2024

Currently this library depends on NodeJS runtime libraries, so it won't work on the edge using edge runtime such as Vercel edge functions or CloudFlare workers (for example using Next.js).

It would be great if this could be supported. The only caveat is that other library loggers would have to support it as well.

Right now I'm getting this error when using a Next.js route which uses the 'edge' runtime:

 ○ Compiling /discover ...
 ⨯ ./node_modules/.pnpm/@google-cloud+common@5.0.2/node_modules/@google-cloud/common/build/src/util.js:25:1
Module not found: Can't resolve 'stream'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/.pnpm/@google-cloud+common@5.0.2/node_modules/@google-cloud/common/build/src/index.js
./node_modules/.pnpm/@google-cloud+logging@11.2.0/node_modules/@google-cloud/logging/build/src/index.js
./lib/logger/log.ts
@steebchen steebchen added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 22, 2024
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/nodejs-logging API. label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/nodejs-logging API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants