Code Monkey home page Code Monkey logo

Comments (8)

isaacs avatar isaacs commented on August 19, 2024 4

What package manager are you using? Is it yarn v1?

The dependencies are defined properly, using npm: aliases. If your package manager is providing the ESM version to the require() endpoint, then it is not up to its job, and should be replaced. I recommend using npm.

from node-glob.

OleksandrKucherenko avatar OleksandrKucherenko commented on August 19, 2024 1

WTF?! this is not the right way to solve the problem that you introduce. Which version is the latest and compatible with CJS?

from node-glob.

isaacs avatar isaacs commented on August 19, 2024 1

Well, like I said, it's a yarn v1 bug. The feature is quite old, no idea why yarn still doesn't support it. I recommend using a package manager that doesn't have this bug, such as npm or pnpm.

from node-glob.

isaacs avatar isaacs commented on August 19, 2024

@OleksandrKucherenko all versions are compatible with cjs as published, with node versions 14 and higher, as stated inengines. This is a yarn bug.

from node-glob.

OleksandrKucherenko avatar OleksandrKucherenko commented on August 19, 2024

I see, version 7.2.3 is the last that works well for me.

All newer versions raise esm error with string-width, ansi-*, etc...

Json-server, mocks-server, concurrently - failed after that, they expect string-width in cjs format.

from node-glob.

OleksandrKucherenko avatar OleksandrKucherenko commented on August 19, 2024
{my_module}@1.0.0
├─┬ [email protected]
│ └─┬ [email protected]
│   ├─┬ [email protected]
│   │ ├── [email protected] deduped
│   │ └─┬ [email protected]
│   │   └── [email protected] deduped
│   └── [email protected]
└─┬ [email protected]
  └─┬ [email protected]
    └─┬ @isaacs/[email protected]
+     ├── [email protected]
      ├─┬ wrap-ansi-cjs@npm:[email protected]
      │ └── [email protected] deduped
      └─┬ [email protected]
+       └── [email protected]

from node-glob.

isaacs avatar isaacs commented on August 19, 2024

@OleksandrKucherenko What package manager are you using?

from node-glob.

OleksandrKucherenko avatar OleksandrKucherenko commented on August 19, 2024

Yarn 1.xx, and i do not have a chance to upgrade it to latest (enterprise monorepo)

from node-glob.

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.