RomainLanz / adonis-bull-queue

Queue system based on BullMQ for AdonisJS
MIT License
147 stars 26 forks source link

Adonis 6 Issue -- cannot find package "App" #41

Closed mattstrayer closed 5 months ago

mattstrayer commented 5 months ago

Hello!

setup a new repo using adonis 6 and tried to add this package. When running node ace queue:listen, I get the following error.

[14:07:21.043] ERROR (97247): Cannot find package 'App' imported from /Users/matt/dev/vandal/hello-world/node_modules/@rlanz/bull-queue/build/src/queue.js
    err: {
      "type": "Error",
      "message": "Cannot find package 'App' imported from /Users/matt/dev/vandal/hello-world/node_modules/@rlanz/bull-queue/build/src/queue.js",
      "stack":
          Error: Cannot find package 'App' imported from /Users/matt/dev/vandal/hello-world/node_modules/@rlanz/bull-queue/build/src/queue.js
              at packageResolve (/Users/matt/dev/vandal/hello-world/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:757:9)
              at moduleResolve (/Users/matt/dev/vandal/hello-world/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:798:18)
              at Object.defaultResolve (/Users/matt/dev/vandal/hello-world/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:912:11)
              at /Users/matt/dev/vandal/hello-world/node_modules/ts-node/src/esm.ts:218:35
              at entrypointFallback (/Users/matt/dev/vandal/hello-world/node_modules/ts-node/src/esm.ts:168:34)
              at /Users/matt/dev/vandal/hello-world/node_modules/ts-node/src/esm.ts:217:14
              at addShortCircuitFlag (/Users/matt/dev/vandal/hello-world/node_modules/ts-node/src/esm.ts:409:21)
              at resolve (/Users/matt/dev/vandal/hello-world/node_modules/ts-node/src/esm.ts:197:12)
              at nextResolve (node:internal/modules/esm/hooks:866:28)
              at Hooks.resolve (node:internal/modules/esm/hooks:304:30)
    }

using Node 20 Got the same error when trying to add the package to an existing adonis 6 project

mattstrayer commented 5 months ago

Nevermind!

I had some jobs left in the queue previously that were trying to get picked up by the worker. Deleting the old jobs fixed my issue.

Sorry for the spam!