aleclarson / vite-tsconfig-paths

Support for TypeScript's path mapping in Vite
MIT License
1.23k stars 44 forks source link

Issue with `4.2.1`: Cannot find module 'vite-tsconfig-paths' #127

Closed maoosi closed 7 months ago

maoosi commented 7 months ago

Issue:

After installing version 4.2.1 with pnpm, it seems the dist/ folder is missing. This makes all the entry points specified in the package.json file invalid:

{
  "main": "dist/index.js",
  "module": "dist/index.mjs",
  "exports": {
    "import": "./dist/index.mjs",
    "require": {
      "types": "./dist/index.d.ts",
      "default": "./dist/index.js"
    }
  }
}

Workaround:

The issue can be temporarily circumvented by rolling back to version 4.2.0, which does include the dist folder.

aleclarson commented 7 months ago

The dist folder exists, according to Unpkg: https://unpkg.com/browse/vite-tsconfig-paths@4.2.1/

Try using pnpm install --force