Comments (5)
Oh wait, but your moduleResolution is set to bundler
there? Something weird is going on. But it’s definitely something in your project, not this tool—the results from the tool match what I see looking at the source code. The results in CI are surprising. Try adding --traceResolution
to the tsc
invocation?
from arethetypeswrong.github.io.
These resolutions are working correctly (both in tsc and in this tool) via file extension substitution. The import
condition specifies ./esm/index.js
, so TypeScript will successfully find ./esm/index.d.ts
.
from arethetypeswrong.github.io.
Uhm, that's not what I'm seeing.
CI results: can't find the types
https://github.com/pixiebrix/pixiebrix-extension/actions/runs/6650563402/job/18070905027#step:5:1
The error message is very clear:
There are types at '/home/runner/work/pixiebrix-extension/pixiebrix-extension/node_modules/css-selector-generator/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'css-selector-generator' library may need to update its package.json or typings.
This is the tsconfig: it worked when the resolution was just node
but not on bundler
The module can only be correctly imported by TypeScript after making the exports
suggested in the linked PR.
from arethetypeswrong.github.io.
@andrewbranch if you're interested in resolving this I can work on a repro
from arethetypeswrong.github.io.
All the files where the error appears are CJS files, so the errors you’re seeing correspond to the node16 (from CJS): ❌ No types
row.
from arethetypeswrong.github.io.
Related Issues (20)
- TS 5.3 incompatibility HOT 3
- core/dist/types.d.ts contains triple-slash reference to ts-expose-internals HOT 1
- What to do for missing export = when it's TypeScript's fault (kinda) HOT 2
- Update MissingExportEquals.md for import default = fetch HOT 3
- lodash types are wrong (or lying?) HOT 6
- Specifying @types packages in the web UI is broken
- Trailing `/` exports don’t get detected as wildcards
- ERR_REQUIRE_ESM when upgrading from 0.13.6 to 0.13.8 HOT 2
- Indicate when JS is unanalyzable
- Understand basic UMD modules HOT 1
- Rule for missing default export / completely wrong exports?
- confusing resolution failure HOT 14
- Why are paths with colons unresolvable? HOT 2
- No errors for ESM module resolution, while errors are expected HOT 3
- [FEATURE]: Create a badge that says whether or not a package passes this repository's tests HOT 3
- Bug: This is too good
- Conditional exports syntax HOT 1
- Seeking NodeJS + TypeScript Demo Project with CJS and ESM Exports HOT 1
- Incorrectly passing when types missing in package exports HOT 3
- How to make this work with svelte? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arethetypeswrong.github.io.