turborepo setup

I created my project using:
npx create-turbo@latest
npx create-turbo@latest
Hello I am having problems to run my turborepo project. I have created structure as: apps/client apps/server packages/game-engine But i cant make it to run correctly. I am having different errors and cant even run my server when doing pnpm run dev
src/index.ts:3:22 - error TS2307: Cannot find module '@travian/game-engine/game' or its corresponding type declarations.
│ There are types at 'C:/Users/root/projektit/travian/apps/server/node_modules/@travian/game-engine/src/game.ts', but this result could not be resolved under your current 'moduleResolutio │n' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

│3 import { Game } from "@travian/game-engine/game";
src/index.ts:3:22 - error TS2307: Cannot find module '@travian/game-engine/game' or its corresponding type declarations.
│ There are types at 'C:/Users/root/projektit/travian/apps/server/node_modules/@travian/game-engine/src/game.ts', but this result could not be resolved under your current 'moduleResolutio │n' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

│3 import { Game } from "@travian/game-engine/game";
My repository: https://github.com/ruhap/travian How to run: clone repo pnpm install pnpm run dev
GitHub
GitHub - ruhap/travian
Contribute to ruhap/travian development by creating an account on GitHub.
1 Reply
rocawear
rocawearOP2w ago
So what I would like to get help, I think my package.json/tsconfigs are wrong(?): How to run my server correctly (now i am using tsc) How to run my "game-engine" package correctly (now i am using tsc) If i do
pnpm run dev
pnpm run dev
and go to http://localhost:3001/hello it does not work so my server is not "running"
@travian/server#dev > cache bypass, force executing eeb2ee1ac4a95249
@travian/client#dev »│
@travian/server#dev »│1 import express from "express";
@travian/game-engine#dev»│ ~~~~~~~

│ ../../node_modules/.pnpm/@[email protected]/node_modules/@types/express/index.d.ts:122:1 │ 122 export = e;
│ ~~~~~~~~~~~
│ This module is declared with 'export =', and can only be used with a default import when │ using the 'esModuleInterop' flag.

│[14.52.23] Found 1 error. Watching for file changes.
@travian/server#dev > cache bypass, force executing eeb2ee1ac4a95249
@travian/client#dev »│
@travian/server#dev »│1 import express from "express";
@travian/game-engine#dev»│ ~~~~~~~

│ ../../node_modules/.pnpm/@[email protected]/node_modules/@types/express/index.d.ts:122:1 │ 122 export = e;
│ ~~~~~~~~~~~
│ This module is declared with 'export =', and can only be used with a default import when │ using the 'esModuleInterop' flag.

│[14.52.23] Found 1 error. Watching for file changes.

Did you find this page helpful?