I have:
packages
-models
-package.json
-....
-server
-src
-index.ts
-package.json
In my packages/server/package.json
, I have:
"scripts": {
"dev": "ts-node src/index.ts"
},
"dependencies": {
"@myapp/models": "../models",
In my packages/server/src/index.ts
, I have:
import { sequelize } from '@myapp/models'
In my packages/models/src/index.ts
, I have:
export type UserAttributes = userAttr
export { sequelize } from './sequelize';
but it gives me an error:
Try `npm install @types/myapp__models` if it exists or add a new declaration (.d.ts) file containing `declare module '@myapp/models';`
import { sequelize } from '@myapp/models'
How do I get this to work properly?