Code Monkey home page Code Monkey logo

require-esm-in-cjs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

require-esm-in-cjs's Issues

Couldn't get it to work

Tried on multiple versions of Node.js from 16 to 20. None of them worked. Did some debugging. Looks like the promise of the dynamic import never resolves. The process just hangs up there. But in fairness there are a lot of hang up issues reported for deasync, so probably it's the fault of that one.

But I've also tried the solution with execSync('sleep 1'), got very similar result. As long as Node.js was stuck in the loop, the code could never get into the .then(...) part of the import(). Looks like execSync is really sync after all, meaning the promise hasn't got a chance to ever resolve. Removing the while loop lets the promise to fulfil. Only issue is that in that case by the time the promise resolves everything else is completed, even the code that wanted to use the imported module.

I just cannot understand how you managed to get that one to work...?

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.