ephemeraHQ / message-kit

MessageKit
https://messagekit.ephemerahq.com/
MIT License
22 stars 2 forks source link

Bug: Errors and Missing Type #107

Closed kevinsslin closed 1 week ago

kevinsslin commented 2 weeks ago

Describe the bug

While trying to run yarn dev, I encountered numerous TypeScript errors, along with missing type declarations for several modules, including @xmtp/message-kit, process, console, and more. The dev server fails to run properly due to these issues.

src/commands.ts(1,35): error TS2307: Cannot find module '@xmtp/message-kit' or its corresponding type declarations.
src/handler/agent.ts(1,38): error TS2307: Cannot find module '@xmtp/message-kit' or its corresponding type declarations.
src/handler/agent.ts(5,8): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
src/handler/agent.ts(6,5): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.
...
(Additional errors with `nodemon`):
TypeError: Cannot read properties of undefined (reading 'filename') in nodemon/lib/version.js:17
Node.js v21.7.1

You can check the details here: https://app.warp.dev/block/pB0pHPhexIaqoIl45dh7VK

Expected behavior

The dev server should start without any missing type declaration errors or TypeScript issues.

Steps to reproduce the bug

  1. Run yarn create message-kit to create and configure the repo.
  2. Run yarn install to install dependencies.
  3. Run yarn dev to start the development server.
fabriguespe commented 1 week ago

hey @kevinsslin can see to replicate this. this works locally for me. Feels like typescript is not properlly installed on your setup? which node version are you in?

fabriguespe commented 1 week ago

Try adding "@types/node": "^20.14.2"

I just added this to the CLI starter package