Skip to content

add zod and fix types #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jovian-Dsouza
Copy link

@Jovian-Dsouza Jovian-Dsouza commented Mar 19, 2025

Fixes Zod dependency issue and install required types for weather-typescript-server

Motivation and Context

Solves #22

> tsc && node -e "require('fs').chmodSync('build/index.js', '755')"

src/index.ts:3:19 - error TS2307: Cannot find module 'zod' or its corresponding type declarations.

3 import { z } from "zod";
                    ~~~~~

src/index.ts:89:23 - error TS18046: 'state' is of type 'unknown'.

89     const stateCode = state.toUpperCase();
                         ~~~~~

src/index.ts:143:49 - error TS18046: 'latitude' is of type 'unknown'.

143     const pointsUrl = `${NWS_API_BASE}/points/${latitude.toFixed(4)},${longitude.toFixed(4)}`;
                                                    ~~~~~~~~

src/index.ts:143:72 - error TS18046: 'longitude' is of type 'unknown'.

143     const pointsUrl = `${NWS_API_BASE}/points/${latitude.toFixed(4)},${longitude.toFixed(4)}`;   

How Has This Been Tested?

Yes

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Copy link

@cundejo cundejo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jovian-Dsouza
Copy link
Author

Still need approvals for merging the changes

@hongshikkim-libertylabs
Copy link

FYI, if you install zod 4 server stops without any message. install zod 3 as this PR did

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants