[Package development] error TS2307: Cannot find module '@bull-board/x' or its corresponding type declarations.

See original GitHub issue

Hi I recently forked bull-board, looking into making package updates. When I checked out the repo and followed the instructions laid out in the README for developing on it, I got a typescript error when running yarn && yarn start:dev at the repo’s root directory:

yarn install v1.22.15
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
info msgpackr-extract-darwin-arm64@1.1.0: The CPU architecture "x64" is incompatible with this module.
info "msgpackr-extract-darwin-arm64@1.1.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info msgpackr-extract-linux-arm@1.1.0: The platform "darwin" is incompatible with this module.
info "msgpackr-extract-linux-arm@1.1.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info msgpackr-extract-linux-arm@1.1.0: The CPU architecture "x64" is incompatible with this module.
info msgpackr-extract-linux-arm64@1.1.0: The platform "darwin" is incompatible with this module.
info "msgpackr-extract-linux-arm64@1.1.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info msgpackr-extract-linux-arm64@1.1.0: The CPU architecture "x64" is incompatible with this module.
info msgpackr-extract-linux-x64@1.1.0: The platform "darwin" is incompatible with this module.
info "msgpackr-extract-linux-x64@1.1.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info msgpackr-extract-win32-x64@1.1.0: The platform "darwin" is incompatible with this module.
info "msgpackr-extract-win32-x64@1.1.0" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗  Linking dependencies...
warning " > babel-loader@8.2.5" has unmet peer dependency "webpack@>=2".
warning "workspace-aggregator-47515b77-7911-4ae7-aef4-5389157763c4 > @bull-board/api > ioredis-mock@7.2.0" has unmet peer dependency "ioredis@4.x".
[4/4] 🔨  Building fresh packages...
✨  Done in 11.66s.
yarn run v1.22.15
$ concurrently "yarn start:dev:ui" "yarn start:dev:server"
$ ts-node-dev --rs example.ts
$ lerna run --scope @bull-board/ui start
[0] lerna notice cli v4.0.0
[0] lerna notice filter including "@bull-board/ui"
[0] lerna info filter [ '@bull-board/ui' ]
[0] lerna info Executing command in 1 package: "yarn run start"
[1] [INFO] 15:53:25 ts-node-dev ver. 1.1.8 (using ts-node ver. 9.1.1, typescript ver. 4.6.3)
[1] Compilation error in /Users/KelseyDH/bull-board/example.ts
[1] [ERROR] 15:53:29 ⨯ Unable to compile TypeScript:
[1] example.ts(5,31): error TS2307: Cannot find module '@bull-board/api/dist/src/queueAdapters/bullMQ' or its corresponding type declarations.
[1] example.ts(6,29): error TS2307: Cannot find module '@bull-board/api/dist/src/queueAdapters/bull' or its corresponding type declarations.
[1] example.ts(7,33): error TS2307: Cannot find module '@bull-board/api' or its corresponding type declarations.
[1] example.ts(8,32): error TS2307: Cannot find module '@bull-board/express' or its corresponding type declarations.
[1]

How can I get the NPM package to build locally without these errors?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
felixmoshcommented, Jul 29, 2022

Try to run yarn build before, so it will copy that file (sorry for this)

0reactions
felixmoshcommented, Jul 30, 2022

I’ve updated Readme & example.ts to be more dev oriented. Thank you for reporting this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tsc throws `TS2307: Cannot find module` for a local file
ts(5,20): error TS2307: Cannot find module 'components/button'. It complains about all imports of local files, like the following: import Counter from ' ...
Read more >
TIL: TypeScript | Fix "TS2307: Cannot find module 'src' or its ...
Story After I updated my package.json and installed all ... error TS2307: Cannot find module 'src' or its corresponding type declarations.
Read more >
Cannot find module 'X' error in Node.js | bobbyhadz
Having an outdated version of the package, or an IDE or development server glitch. Forgetting to install type definitions for a package in...
Read more >
error ts2307: cannot find module or its corresponding type ...
I am setting up a NodeJS + Mysql + Typescript + Docker app, but have a problem when I try to include the...
Read more >
Cannot find module 'xstate' or its corresponding type ... - GitHub
It seems to find it ok in the production code, but the tests do not work. error TS2307: Cannot find module 'xstate' or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found