triggerdotdev / trigger.dev

Trigger.dev is the open source background jobs platform for TypeScript.

Home Page:https://trigger.dev/changelog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: Broken installation following quick start steps

daguej opened this issue · comments

Provide environment information

  System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900HX
    Memory: 6.74 GB / 15.47 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm

Describe the bug

After following the v3 quick start guide in an existing next.js app and setting up a call to trigger a job, I get two different kinds of errors when I run the next app:

  1. Broken OpenTelemetry
 ⚠ ./node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.js
./node_modules/@opentelemetry/instrumentation/build/src/platform/node/index.js
./node_modules/@opentelemetry/instrumentation/build/src/platform/index.js
./node_modules/@opentelemetry/instrumentation/build/src/index.js
./node_modules/@trigger.dev/core/dist/v3/index.mjs
./node_modules/@trigger.dev/sdk/dist/v3/index.mjs
./trigger/some-job.ts
./app/api/…/route.ts

./node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.js

These can errors can be silenced with the workaround posted here, but it's unclear to me whether there's actually a problem.

  1. Broken invocations
    Trying to invoke a Trigger job results in an error:
 ⚠ ./node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js
Module not found: Can't resolve 'bufferutil' in './node_modules/engine.io-client/node_modules/ws/lib'

Import trace for requested module:
./node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js
./node_modules/engine.io-client/node_modules/ws/lib/sender.js
./node_modules/engine.io-client/node_modules/ws/wrapper.mjs
./node_modules/engine.io-client/build/esm-debug/transports/websocket-constructor.js
./node_modules/engine.io-client/build/esm-debug/index.js
./node_modules/socket.io-client/build/esm-debug/url.js
./node_modules/socket.io-client/build/esm-debug/index.js
./node_modules/@trigger.dev/core/dist/v3/index.mjs
./node_modules/@trigger.dev/sdk/dist/v3/index.mjs
./trigger/some-job.ts
./app/api/…/route.ts

./node_modules/engine.io-client/node_modules/ws/lib/validation.js
Module not found: Can't resolve 'utf-8-validate' in './node_modules/engine.io-client/node_modules/ws/lib'

Import trace for requested module:
./node_modules/engine.io-client/node_modules/ws/lib/validation.js
./node_modules/engine.io-client/node_modules/ws/lib/sender.js
./node_modules/engine.io-client/node_modules/ws/wrapper.mjs
./node_modules/engine.io-client/build/esm-debug/transports/websocket-constructor.js
./node_modules/engine.io-client/build/esm-debug/index.js
./node_modules/socket.io-client/build/esm-debug/url.js
./node_modules/socket.io-client/build/esm-debug/index.js
./node_modules/@trigger.dev/core/dist/v3/index.mjs
./node_modules/@trigger.dev/sdk/dist/v3/index.mjs
./trigger/some-job.ts
./app/api/…/route.ts

Running npm install bufferutil utf-8-validate seems to solve the problem.

Reproduction repo

To reproduce

In an existing next.js app, follow the steps in the quick start guide. Specifically, npx trigger.dev@beta init.

Occurred with @trigger.dev/sdk 3.0.0-beta.12.

Additional information

No response

Oh, also got the same resolution error for msw, which I also had to npm install manually.

I think this should be solved with all the changes we've made to the init command