GithubHelp home page GithubHelp logo

Comments (5)

samydoesit avatar samydoesit commented on September 13, 2024 1

Thanks for your quick response. :)
I thought maybe there is another way.

We will keep the CommonJS output for now.

from cucumber-js.

GRmeB avatar GRmeB commented on September 13, 2024

+1 Same issue here...

from cucumber-js.

davidjgoss avatar davidjgoss commented on September 13, 2024

Thanks @samydoesit for raising, and taking the time to make that repro.

I've looked at the config there, but my understanding is that it would not work with or without Cucumber. From the relevant ts-node documentation:

..."paths" are intended to describe mappings that the build tool or runtime already performs, not to tell the build tool or runtime how to resolve modules. In other words, they intend us to write our imports in a way node already understands. For this reason, ts-node does not modify node's module resolution behavior to implement "paths" mappings.

ts-config-paths tends to be used for this, but from what I can see lacks ESM support for now, so unfortunately to have path mapping like this you may need to go back to CommonJS output.

from cucumber-js.

dnotes avatar dnotes commented on September 13, 2024

To clarify, is there no way to import from the local files when using ts-node/esm? I can't seem to import even if I use a relative path, even if the files are in the same directory, but perhaps that's a different issue.

from cucumber-js.

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.