WindmillWWindmill
Powered by
StefanS
Windmill•16mo ago•
2 replies
Stefan

[FIXED] TS Bun Deployment Fails with with googleapis lib

Hi, noticed that deployment of TS Bun script is failing, even though code execution works as expected when the script is tested

mimimum reproducible .ts bun script
import * as wmill from "windmill-client"
import { google } from "googleapis";

type CGoogleServiceAccount = {
  type: string;
  auth_uri: string;
  client_id: string;
  token_uri: string;
  project_id: string;
  private_key: string;
  client_email: string;
  private_key_id: string;
  universe_domain: string;
  client_x509_cert_url: string;
  auth_provider_x509_cert_url: string;
};
export async function main(serviceAccount: CGoogleServiceAccount) {
  new google.auth.GoogleAuth({
    credentials: {
      client_email: serviceAccount.client_email,
      private_key: serviceAccount.private_key,
    },
    scopes: ["https://www.googleapis.com/auth/drive"],
  });
  return
}
import * as wmill from "windmill-client"
import { google } from "googleapis";

type CGoogleServiceAccount = {
  type: string;
  auth_uri: string;
  client_id: string;
  token_uri: string;
  project_id: string;
  private_key: string;
  client_email: string;
  private_key_id: string;
  universe_domain: string;
  client_x509_cert_url: string;
  auth_provider_x509_cert_url: string;
};
export async function main(serviceAccount: CGoogleServiceAccount) {
  new google.auth.GoogleAuth({
    credentials: {
      client_email: serviceAccount.client_email,
      private_key: serviceAccount.private_key,
    },
    scopes: ["https://www.googleapis.com/auth/drive"],
  });
  return
}


Steps to reproduce:
1. Paste code into TS script (Bun)
2. Replace client_email / private_key with placeholder strings
3. Hit run
4. Observe bun install working as expected
5. Observe bun code execution working as expected
6. Attempt to Deploy
7. Observe deploy failing with
job=01933508-cf2b-10d0-ee4a-2e47841a8c2f tag=bun worker=wk-default-91914a77b603-Fk2UG hostname=91914a77b603

bun install v1.1.34 (5e5e7c60)
Saved lockfile
+ googleapis@144.0.0
41 packages installed [145.00ms]
process terminated by signal: Some(
    9,
), stopped_signal: None, core_dumped: false
job=01933508-cf2b-10d0-ee4a-2e47841a8c2f tag=bun worker=wk-default-91914a77b603-Fk2UG hostname=91914a77b603

bun install v1.1.34 (5e5e7c60)
Saved lockfile
+ googleapis@144.0.0
41 packages installed [145.00ms]
process terminated by signal: Some(
    9,
), stopped_signal: None, core_dumped: false


Reproduced on self-hosted Windmill
CE v1.424.0
CE v1.424.0
WindmillJoin
3,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

script runs fine, but deployment fails with Could not resolve: "typescript".
ni_kaNni_ka / help
11mo ago
Python cchardet lib
EnterEEnter / help
3y ago
Bun-Scripts do not respond
LükuLLüku / help
2mo ago
Bun shell script best practices?
ZachZZach / help
10mo ago