UrielCh / midjourney-client

midjourney-client in deno
MIT License
55 stars 11 forks source link

latest error.. #8

Closed lordmen99 closed 1 year ago

lordmen99 commented 1 year ago

node:internal/process/esm_loader:108 internalBinding('errors').triggerUncaughtException( ^

Error: Transform failed with 1 error: /Users/macpro/Downloads/api-key-nodejs-master/coba.ts:5:12: ERROR: Top-level await is currently not supported with the "cjs" output format at failureErrorWithLog (/Users/macpro/.npm/_npx/fd45a72a545557e9/node_modules/esbuild/lib/main.js:1636:15) at /Users/macpro/.npm/_npx/fd45a72a545557e9/node_modules/esbuild/lib/main.js:837:29

its use command /imagine with latest version

UrielCh commented 1 year ago

I do not have the file named coba.ts can not help.

lordmen99 commented 1 year ago

thats file same code from ur example and frontpage this source app

UrielCh commented 1 year ago

Please try to ask this question to chatGPT, It will solve your issue, I can not teach you how to code.

"top-level await" is a modern javascript feature. you really need to be able to solve that alone.

lordmen99 commented 1 year ago

give sample after imagine can get progress in log

UrielCh commented 1 year ago

check the example like:

https://github.com/UrielCh/midjourney-client/blob/main/samples/variantLast.ts

depending on https://github.com/UrielCh/midjourney-client/blob/main/samples/progressLogger.ts