Giter Site home page Giter Site logo

Comments (7)

BrandonFitzgibbon avatar BrandonFitzgibbon commented on April 28, 2024 7

Just adding our voice that we rolled back to 2.0.9. This issue started in 2.0.10 after changes in PR #56.

from react.

KenanYusuf avatar KenanYusuf commented on April 28, 2024 2

I have just started seeing this error on v2.0.8 on a clean install of a project with @phosphor-icons/react

from react.

rektdeckard avatar rektdeckard commented on April 28, 2024 1

Hey all, I am assuming this is Node >= 18 (think) strategy for Determining modules system, and will be pushing an update where artifacts are emitted with .cjs and .mjs extensions, as opposed to .umd.js and .es.js. Will update here when live.

from react.

mountagency avatar mountagency commented on April 28, 2024

Can confirm this. Rolled back to 2.0.8.

from react.

dolmios avatar dolmios commented on April 28, 2024

Interesting. 2.0.9 is my last working version, with 2.0.10 throwing that error.

unhandledRejection Error [ERR_REQUIRE_ESM]: require() of ES Module /app/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@phosphor-icons/react/dist/index.umd.js not supported.

index.umd.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.

Instead rename index.umd.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in app/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@phosphor-icons/react/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).

from react.

rektdeckard avatar rektdeckard commented on April 28, 2024

OK all, added the exports.require fields in package.json and renamed all the artifacts. There is a build published on NPM at version 2.1.3, which can be installed under the tag @phosphor-icons/react@next. Please give this a try and let me know if it fixes things for you.

from react.

rektdeckard avatar rektdeckard commented on April 28, 2024

Live in stable >=2.0.13. Marking as resolved.

from react.

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.