#`@types/express` be like or i have something wrong? D:

20 messages · Page 1 of 1 (latest)

steady oriole
#

Types are bugged or i did something wrong?

(I think they wrong packed types / bad package.json)

package.json from package

    "dependencies": {
        "@types/body-parser": "*",
        "@types/express-serve-static-core": "^5.0.0",
        "@types/qs": "*",
        "@types/serve-static": "*"
    },

PING ME IN ANSWER! 😄

void anchor
#

make sure your packages have been installed correctly and that npm didn't produce any error @steady oriole

steady oriole
#

I'm using pnpm and there is no error (It's monorepo)

void anchor
#

did you fiddle with the typesRoot property of your tsconfig?

steady oriole
#

Probly not, but i can check, sec

#

Nah

#
{
    "$schema": "http://json.schemastore.org/tsconfig",
    "compilerOptions": {
        "esModuleInterop": true,
        "jsx": "react",
        "outDir": "./dist",
        "baseUrl": "src",
        "paths": {
            "@/*": ["*", "*/index.ts", "*.ts"],
            "@env": ["utils/envVariables.ts"],
            "@app": ["app.ts"]
        },
        "stripInternal": true,
        "plugins": [
            {
                "transform": "typia/lib/transform"
            }
        ],
        "preserveSymlinks": true,
        "strict": true
    },
    "extends": "@ineedj/tsconfig/base.json"
}

@ineedj/tsconfig/base.json:

{
  "$schema": "https://json.schemastore.org/tsconfig",

  "compilerOptions": {
    "lib": ["esnext", "dom"],
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "target": "ES6",
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "alwaysStrict": false,
    "exactOptionalPropertyTypes": false,
    "noFallthroughCasesInSwitch": false,
    "noImplicitAny": true,
    "noImplicitOverride": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noPropertyAccessFromIndexSignature": false,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "strict": true,
    "strictBindCallApply": true,
    "strictFunctionTypes": true,
    "strictNullChecks": true,
    "strictPropertyInitialization": true,
    "resolveJsonModule": true
  },
  "display": "default",
  "exclude": ["node_modules", "dist", "lib"]
}
#

There is missing packages, this is problem, why pnpm do not install them?

void anchor
#

¯_(ツ)_/¯

steady oriole
#

W8, im gonna make it public and see that you have same problem

#

Just use pnpm install, maybe you will need to use pnpm prepare at apps/server

#

and you gonna have problems at app.ts, app is core.Express which is any cuz this errors (click express to check type definition which has errors)

visual belfry
#

I mean, express types are fine

#

Not really sure why you are looking in the types file to begin with

#

Probably don't worry about that, only if you have a problem in your project

steady oriole
steady oriole
#

Still not resolved

#

Solved, but still looking for better solution.

Solution

Installed manually every @types/XYZ

steep zenith