phosphor-icons / react

A flexible icon family for React

Home Page:https://phosphoricons.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find package on node 20

kareljan opened this issue · comments

Describe the bug

When I try to use the icons in a nextjs project on node 20.12.0 I get the following error.

Cannot find package '/pathtoproject/node_modules/@phosphor-icons/react/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/package.json'

Steps to Reproduce

Try using it in a node 20 react project

Expected behavior

No errors

Context (please complete the following information):

  • OS: Mac OS 14.4
  • @phosphor-icons/react
  • Version 2.1.4

I just created a fresh React/Typescript/Vite/Node 20.12.0 project and have no issues, so I suspect this may be specific to NextJS...as usual.

Can you share a minimal reproduction I can test against? StackBlitz doesn't support Node 20 just yet, but maybe a GitHub Codespace or something? Thanks.

Hey @rektdeckard

For now, I don't seem to get it to break in a contained environment. I guess the problem lies deeper in my code.
I'll keep you posted if I find the cause of the problem.

Hey @rektdeckard

You can find a minimal example of the error on https://supreme-space-orbit-rq9g7q4xqx3rpv.github.dev/
and on this link you can find a minimal example of the error in node 18 https://fantastic-broccoli-74pw7v6r7vw3w5x.github.dev/

im having this issue as well. had to revert to 2.1.0 and suddenly from 2.1.4 no issue. Also on node v20. Also using vite + react, but issue only appears in vitest which is odd.

#94 possibly related but opened separately

Identified to be same issue as #90. Closing as duplicate, but fix incoming!