Skip to content

Zod and typescript issues when running weather-typescript-server #22

@Jovian-Dsouza

Description

@Jovian-Dsouza

Describe the bug
Zod and typescript issues when running weather-typescript-server

To Reproduce
Steps to reproduce the behavior:

  1. pnpm install
  2. pnpm run build

Expected behavior
A clear and concise description of what you expected to happen.

Logs

> 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)}`;   

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions