-
I tried to import the schema from the @acme/db package, but I was unable to compile it. I have fixed some issues, but I am still unable to resolve this particular problem. the error is my nestjs tsconfig.json Any assistance would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
"@acme/": ["../../packages//dist"] => this will build only js files and you trying to import ts from that or ? |
Beta Was this translation helpful? Give feedback.
-
Here is my solution,
{
|
Beta Was this translation helpful? Give feedback.
Here is my solution,
I am using nestjs as my second backend
{
"extends": "@acme/tsconfig/internal-package.json",
"include": ["src"],
"exclude": ["node_modules", "dist"],
"compilerOptions": {
"module": "esnext", // Use modern module system
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": false, // Ensure this is false to emit JavaScript
"noEmit": false,
"outDir": "./dist" // Specify output directory
}
}
In package.json export .js file also (my package.json exports)
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./client": {
"types":…