Hello, I'm trying to configure a monorepo with npm workspaces, and under my "express-js" package, whenever I try to import the express module, it tries to import it from packages/express-js/index.ts, what's even weirder is that if I rename my package to something else, say "packages/server", the error immediately goes away but comes back when reinstalling my node modules, does anybody know what's going on?
#Import error in NPM workspaces
1 messages · Page 1 of 1 (latest)
Yeah, seems like there's something weird with your setup, I don't know why it'd be looking there for "express" instead of node_modules. What's in your tsconfig? Is there some path mapping logic?
Nope, no path mapping
{
"compilerOptions": {
"outDir": "./dist",
"rootDir": ".",
"strict": true,
"skipLibCheck": true,
"esModuleInterop": true,
"module": "commonjs",
"target": "ES6"
}
}