jawj / zapatos

Zero-abstraction Postgres for TypeScript: a non-ORM database library
https://jawj.github.io/zapatos/
Other
1.3k stars 46 forks source link

typescript error import zapatos/schema #156

Closed Kev1ntan closed 1 year ago

Kev1ntan commented 1 year ago

hi, i got typescript error while import zapatos/schema. below is my tsconfig.json

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "commonjs",
    "sourceMap": true,
    "outDir": "./build",
    "strictNullChecks": false,
    "typeRoots": ["./typings", "./node_modules/@types"],
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "types": ["node", "jest", "express"],
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "noEmitOnError": false,
    "strict": false
  },
  "include": ["**/*.ts"],
  "exclude": ["build", "node_modules", "test"]
}

Cannot find module 'zapatos/schema' or its corresponding type declarations.

please help, thanks.

jawj commented 1 year ago

Have you yet run npx zapatos to generate your typings?

You then need to make sure your Zapatos typings are included in the include path.

To make Zapatos work well, you need "strictNullChecks": true.

If it continues not to work, please post a repo I can take a look at to troubleshoot.