-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.regressionscope: types
Description
Vue version
3.3.7
Link to minimal reproduction
Steps to reproduce
What is expected?
no error
What is actually happening?
error
node_modules/.pnpm/@vue+compiler-sfc@3.3.7/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts:1:32 - error TS2307: Cannot find module 'lru-cache/min' or its corresponding type declarations.
1 import * as lru_cache_min from 'lru-cache/min'
Found 1 error in node_modules/.pnpm/@vue+compiler-sfc@3.3.7/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts:1
Any additional comments?
lru-cache@10.0.1
Install lru-cache
independently is still failed because there is no lru-cache/min
;
I found this problem seems to be more related to tsc
. link repro - 2
Suggestion
-
added
lru-cache
to dependencies
core/packages/compiler-sfc/package.json
Line 50 in 9ca468c
"lru-cache": "^10.0.1", -
set
node
instead ofbundler
onmoduleResolution
property or only instead for build(tsconfig.build.json
), it will work fine.
Line 10 in 9ca468c
"moduleResolution": "bundler",
if it's not a bug, please close the issue. Because moduleResolution
property set to bundler
will work fine in my project.
lazyboon, Seungwoo321 and moeshin
Metadata
Metadata
Assignees
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.regressionscope: types