turbo icon indicating copy to clipboard operation
turbo copied to clipboard

Packages can not be auto imported in vscode

Open tiavina-mika opened this issue 1 year ago • 9 comments

What version of Turborepo are you using?

1.9.3

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Windows

Describe the Bug

The import work, but the auto import is not working, so I should manually write the import. Here is my structure: image

package.json

{
  "name": "@myturbo/types",
  "version": "1.0.0",
  "description": "typescript types and interfaces",
  "author": "tiavina-mika",
  "license": "MIT",
  "main": "./index.ts",
  "types": "./index.ts",
  "devDependencies": {
    "typescript": "^5.0.4",
    "tsconfig": "*"
  }
}

tsconfig.json

{
  "extends": "tsconfig/base.json",
  "compilerOptions": {
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "isolatedModules": true,
    "moduleResolution": "node",
    "preserveWatchOutput": true,
    "skipLibCheck": true,
    "noEmit": true,
    "strict": true
  },
  "exclude": ["node_modules"]
}

index.ts

export interface IArticle {
  title: string;
}

apps/docs/package.json

{
  "name": "docs",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "next dev --port 3001",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "next": "^13.4.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "ui": "*"
  },
  "devDependencies": {
    "@types/node": "^17.0.12",
    "@types/react": "^18.0.22",
    "@types/react-dom": "^18.0.7",
    "eslint-config-custom": "*",
    "tsconfig": "*",
    "typescript": "^4.5.3",
    "@myturbo/types": "*"
  }
}

Expected Behavior

Should auto suggested and auto import in vs code

To Reproduce

  • create a new packages
  • add the package in package.json of the app that will need it
  • write the exported code, vscode does not suggest it

Reproduction Repo

No response

tiavina-mika avatar May 13 '23 13:05 tiavina-mika