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
414 stars 41 forks source link

`npm:inngest` fails due to missing `uWebSockets.js` package #572

Closed jpwilliams closed 4 months ago

jpwilliams commented 4 months ago

Summary

Using the npm: specifier when importing inngest (e.g. npm:inngest) results in an error when trying to fetch the uWebSockets.js package.

This package is known to not be on npm and instead accessible as a GitHub URL. See uNetworking/uWebSockets.js#92.

This is also blocking us from deploying inngest to https://jsr.io, as vendoring the dependencies has the same error. JSR is exploring allowing GitHub URLs for dependencies over at jsr-io/jsr#102.

Reproduce

Any Deno file that imports inngest using npm:inngest will produce the error when fetching the package:

import { Inngest } from "npm:inngest";

Expected behaviour

The package downloads and is imported successfully.

Workaround

A workaround at present is to instead use the https://esm.sh proxy, for example:

import { Inngest } from "https://esm.sh/inngest@3.19.2";

Logs

jack@Bernard:~/scratch/deno-import-test$ deno run -A main.ts 
error: npm package 'uWebSockets.js' does not exist.
linear[bot] commented 4 months ago

INN-3064 `npm:inngest` fails due to missing `uWebSockets.js` package

jpwilliams commented 4 months ago

578 introduced JSR publishing and ensured all serve-related dependencies were marked as peer dependencies. The package is published at @inngest/sdk.

For this issue, I'd recommend now installing the SDK using JSR instead of with the npm: specifier.

deno add @inngest/sdk

With uNetworking/uWebSockets.js#92, I don't expect this package to be available on npm any time soon. If it were a production dependency of our package then we'd investigate vendoring it here, but JSR should provide an ample solution given that it's only a peer dependency.

Related