chore: explicitly declare body-parser dependency for pnpm #2873

Merged
Sainan merged 3 commits from MindXL/SpaceNinjaServer:main into main 2025-10-07 23:21:18 -07:00
Contributor

An error was reported when running build:

src/app.ts:3:24 - error TS2307: Cannot find module 'body-parser' or its corresponding type declarations.

3 import bodyParser from "body-parser";

An error was reported when running build: > src/app.ts:3:24 - error TS2307: Cannot find module 'body-parser' or its corresponding type declarations. > > 3 import bodyParser from "body-parser";
MindXL added 1 commit 2025-10-07 06:07:22 -07:00
fix(depend): add missing module before run build script
All checks were successful
Build / build (pull_request) Successful in 1m16s
edb42cee0d
Owner

body-parser is a dependency of express, so it should be installed with npm i or npm ci. I certainly wonder how you managed to fuck it up.

body-parser is a dependency of express, so it should be installed with `npm i` or `npm ci`. I certainly wonder how you managed to fuck it up.
Sainan closed this pull request 2025-10-07 06:14:08 -07:00
Author
Contributor

Try pnpm i. Pnpm did not install body-parse when I'm exploring.

Try `pnpm i`. Pnpm did not install `body-parse` when I'm exploring.
Owner

Does the guide say to use pnpm or npm? :)

Does the guide say to use `pnpm` or `npm`? :)
Owner

Also, in general, building is not needed anymore unless you're on a super old Node version.

Also, in general, building is not needed anymore unless you're on a super old Node version.
Sainan reopened this pull request 2025-10-07 06:33:25 -07:00
Sainan changed title from fix(depend): add missing module before run build script to chore: explicitly declare body-parser dependency for pnpm 2025-10-07 06:33:46 -07:00
Sainan added 2 commits 2025-10-07 06:37:25 -07:00
update package-lock
All checks were successful
Build / build (pull_request) Successful in 1m11s
de689649ce
Sainan approved these changes 2025-10-07 06:37:56 -07:00
Author
Contributor

I merely use pnpm to manage modules. After cloning this repo, I ran pnpm i and then pnpm run build (or pnpm run raw, or something similar). Both pnpm and VSCode reported missing modules. I thought this might be an issue that others might run into and might need a fix for. But in the end, it's OK if we look at this in a different way. It depends on your perspective.

I merely use `pnpm` to manage modules. After cloning this repo, I ran `pnpm i` and then `pnpm run build` (or `pnpm run raw`, or something similar). Both pnpm and VSCode reported missing modules. I thought this might be an issue that others might run into and might need a fix for. But in the end, it's OK if we look at this in a different way. It depends on your perspective.
Sainan merged commit 6a571e5e78 into main 2025-10-07 23:21:18 -07:00
Sign in to join this conversation.
No description provided.