The most simple google vision api example would just hang at line await client.textDetection(fileName);:
const vision = require('@google-cloud/vision');
// Creates a client
const client = new vision.ImageAnnotatorClient();
/**
* TODO(developer): Uncomment the following line before running the sample.
*/
// const fileName = 'Local image file, e.g. /path/to/image.png';
// Performs text detection on the local file
const [result] = await client.textDetection(fileName);
const detections = result.textAnnotations;
console.log('Text:');
detections.forEach(text => console.log(text));
What version of Bun is running?
1.0.7+b0393fba6200d8573f3433fb0af258a0e33ac157
What platform is your computer?
Darwin 22.3.0 arm64 arm
What steps can reproduce the bug?
The most simple google vision api example would just hang at line
await client.textDetection(fileName);
:ref: https://cloud.google.com/vision/docs/ocr#vision_text_detection-nodejs
What is the expected behavior?
it should return the correct ocr result.
What do you see instead?
program just stopped at IO
Additional information
I can use
tsc && node .../index.js
to run script successfully. Butbun
runtime would hang