Is it possible to use spanner nodejs client library in workers?
Anyone know if it's possible to use the nodejs spanner client library in a cloudflare worker with node compatibility flags? I tried but failed so just wanted to check if it's a skill issue.
I get this error:
⎔ Starting local server...✘ [ERROR] service core:user:spanner-hono-cloudflare: Uncaught TypeError: __require.resolve is not a function at null.<anonymous> (index.js:49631:57) in node_modules/.pnpm/@google-cloud+spanner@7.17.1/node_modules/@google-cloud/spanner/build/src/common-grpc/service.js at null.<anonymous> (index.js:32:51) in __require2 at null.<anonymous> (index.js:155552:21) in node_modules/.pnpm/@google-cloud+spanner@7.17.1/node_modules/@google-cloud/spanner/build/src/index.js at null.<anonymous> (index.js:32:51) in __require2 at null.<anonymous> (index.js:158271:30)✘ [ERROR] The Workers runtime failed to start. There is likely additional logging output above.
⎔ Starting local server...✘ [ERROR] service core:user:spanner-hono-cloudflare: Uncaught TypeError: __require.resolve is not a function at null.<anonymous> (index.js:49631:57) in node_modules/.pnpm/@google-cloud+spanner@7.17.1/node_modules/@google-cloud/spanner/build/src/common-grpc/service.js at null.<anonymous> (index.js:32:51) in __require2 at null.<anonymous> (index.js:155552:21) in node_modules/.pnpm/@google-cloud+spanner@7.17.1/node_modules/@google-cloud/spanner/build/src/index.js at null.<anonymous> (index.js:32:51) in __require2 at null.<anonymous> (index.js:158271:30)✘ [ERROR] The Workers runtime failed to start. There is likely additional logging output above.
Node.js client for Google Cloud Spanner: the world’s first fully managed relational database service to offer both strong consistency and horizontal scalability. - googleapis/nodejs-spanner