Skip to content

Conversation

@4geru
Copy link
Contributor

@4geru 4geru commented Apr 15, 2025

Background

Hi! My name is 4geru. I'm a member of LINE API Expert.
I set up the local environment. However, I got an error that did not find the zod package and some syntaxes.

log
  pnpm run build
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+sha512.2d92c86b7928dc8284f53494fb4201f983da65f0fb4f0d40baafa5cf628fa31dae3e5968f12466f17df7e97310e30f343a648baea1b9b350685dafafffdf5808.
! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager


> @line/line-bot-mcp-server@0.0.1 prebuild /Users/uchinishi.koichi/train/line-bot-mcp-server
> npm run format:check && npm run clean


> @line/line-bot-mcp-server@0.0.1 format:check
> npm run prettier -- -l


> @line/line-bot-mcp-server@0.0.1 prettier
> prettier "src/**/*.ts" -l


> @line/line-bot-mcp-server@0.0.1 clean
> rm -rf dist/*


> @line/line-bot-mcp-server@0.0.1 build /Users/uchinishi.koichi/train/line-bot-mcp-server
> tsc && shx chmod +x dist/*.js

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

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

src/index.ts:58:7 - error TS2322: Type 'unknown' is not assignable to type 'string'.

58       to: userId ?? destinationId,
         ~~

  node_modules/.pnpm/@line+bot-sdk@9.8.0/node_modules/@line/bot-sdk/dist/messaging-api/model/pushMessageRequest.d.ts:19:5
    19     to: string;
           ~~
    The expected type comes from property 'to' which is declared here on type 'PushMessageRequest'

src/index.ts:108:7 - error TS2322: Type 'unknown' is not assignable to type 'string'.

108       to: userId ?? destinationId,
          ~~

  node_modules/.pnpm/@line+bot-sdk@9.8.0/node_modules/@line/bot-sdk/dist/messaging-api/model/pushMessageRequest.d.ts:19:5
    19     to: string;
           ~~
    The expected type comes from property 'to' which is declared here on type 'PushMessageRequest'

src/index.ts:135:7 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.

135       userId ?? destinationId,
          ~~~~~~~~~~~~~~~~~~~~~~~


Found 4 errors in the same file, starting at: src/index.ts:20ELIFECYCLECommand failed with exit code 2.

After installing zod package. The build was a success. 🎉

@CLAassistant
Copy link

CLAassistant commented Apr 15, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@eucyt eucyt left a comment

Choose a reason for hiding this comment

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

Thank you 🙇

@eucyt eucyt added this pull request to the merge queue Apr 16, 2025
Merged via the queue into line:main with commit 50f8245 Apr 16, 2025
5 checks passed
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.

3 participants