Coder Social home page Coder Social logo

Comments (5)

andrewbranch avatar andrewbranch commented on May 23, 2024 1

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.

andrewbranch avatar andrewbranch commented on May 23, 2024

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.

fregante avatar fregante commented on May 23, 2024

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

https://github.com/pixiebrix/pixiebrix-extension/blob/a2b04ba31401e122a141138478021fa400b7b817/tsconfig.json#L8

The module can only be correctly imported by TypeScript after making the exports suggested in the linked PR.

from arethetypeswrong.github.io.

fregante avatar fregante commented on May 23, 2024

@andrewbranch if you're interested in resolving this I can work on a repro

from arethetypeswrong.github.io.

andrewbranch avatar andrewbranch commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.