inngest / inngest-js

The developer platform for easily building reliable workflows with zero infrastructure for TypeScript & JavaScript
https://www.inngest.com/
GNU General Public License v3.0
387 stars 38 forks source link

[BUG] Miniflare testing not working due to chalk #563

Open psteinroe opened 3 months ago

psteinroe commented 3 months ago

Describe the bug When running a test with mini flare (Cloudflare Worker local dev env) and Inngestjs, it always crashes with

TypeError: Cannot read properties of undefined (reading 'bold')
 ❯ Users/psteinroe/Developer/hellomateo/node_modules/inngest/helpers/consts.js?mf_vitest_no_cjs_esm_shim:146:45
 ❯ Users/psteinroe/Developer/hellomateo/node_modules/inngest/helpers/env.js?mf_vitest_no_cjs_esm_shim:9:18
 ❯ Users/psteinroe/Developer/hellomateo/node_modules/inngest/api/api.js?mf_vitest_no_cjs_esm_shim:4:15
 ❯ Users/psteinroe/Developer/hellomateo/node_modules/inngest/components/Inngest.js?mf_vitest_no_cjs_esm_shim:4:15
 ❯ Users/psteinroe/Developer/hellomateo/node_modules/inngest/index.js?mf_vitest_no_cjs_esm_shim:6:17

The reason is that for some reason, chalk.magenta is undefined. Is there any way we could change it to return a default prefix (without chalk) if its not there?

linear[bot] commented 3 months ago

INN-3007 [BUG] Miniflare testing not working due to chalk