Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] New project generated by create-refine-app fails to start with pnpm #4921

Closed
jamesknelson opened this issue Sep 7, 2023 · 3 comments · Fixed by #4978
Closed

[BUG] New project generated by create-refine-app fails to start with pnpm #4921

jamesknelson opened this issue Sep 7, 2023 · 3 comments · Fixed by #4978
Labels
bug Something isn't working

Comments

@jamesknelson
Copy link

jamesknelson commented Sep 7, 2023

Describe the bug

After running pnpm create refine-app@latest for the first time, it generates a project, but then pnpm dev fails with:

✘ [ERROR] No matching export in "node_modules/.pnpm/@tabler+icons@1.35.0_react-dom@18.0.0_react@18.0.0/node_modules/@tabler/icons/icons-react/dist/index.esm.js" for import "IconFileExport"

    node_modules/.pnpm/@refinedev+mantine@2.5.0_@emotion+react@11.8.2_@mantine+core@5.10.4_@mantine+form@5.10.4_@man_weaus3jy4gluisabrak4qaipqu/node_modules/@refinedev/mantine/dist/esm/index.js:1:12049:
      1 │ ...om"@mantine/core";import{IconFileExport as Nt}from"@tabler/icons...
        ╵                             ~~~~~~~~~~~~~~

✘ [ERROR] No matching export in "node_modules/.pnpm/@tabler+icons@1.35.0_react-dom@18.0.0_react@18.0.0/node_modules/@tabler/icons/icons-react/dist/index.esm.js" for import "IconFileImport"

    node_modules/.pnpm/@refinedev+mantine@2.5.0_@emotion+react@11.8.2_@mantine+core@5.10.4_@mantine+form@5.10.4_@man_weaus3jy4gluisabrak4qaipqu/node_modules/@refinedev/mantine/dist/esm/index.js:1:14772:
      1 │ ...om"@mantine/core";import{IconFileImport as jt}from"@tabler/icons...
        ╵                             ~~~~~~~~~~~~~~

Note that replacing pnpm with npm does not fail, so the problem seems to be limited to pnpm.

Steps To Reproduce

Run pnpm create refine-app@latest, selecting:

  • Vite
  • Hasura
  • Mantine or Chakra (I haven't tested other options)
  • Yes (for example page)
  • Custom (for auth provider)
  • Yes or No (for i18n support, I've tested both)
  • pNpm (npm works correctly)

Then cd into the new directory and run pnpm dev

Expected behavior

The app should start correctly.

Screenshot

No response

Desktop

  • OS: MacOS 13.4.1
  • Node: 18.17.1
  • pnpm: 8.6.2

Mobile

No response

Additional Context

No response

@jamesknelson jamesknelson added the bug Something isn't working label Sep 7, 2023
@aliemir
Copy link
Member

aliemir commented Sep 7, 2023

Hey @jamesknelson, sorry for the issue! This issue looks like it's related to the pnpms store/cache. Based on the error message, seems like it's trying to install the version @tabler/icons@1.35.0. I've just checked the @tabler/icons repo and it do misses the IconFileExport export in 1.35.0 🤔

We've had similar issues with pnpm in the past, here's a workaround solution from a previous one #4921. That one was related with the peer dependencies and our way of handling peers (Only updating the peer dependencies when there's a major version bump in any of the dependencies). In your case it's related with a direct dependency of @refinedev/mantine package.

As a quick solution, you can try running pnpm store add @tabler/icons@1.119.0 (latest v1 version tag) and let pnpm update its store with a more recent version. If this does not work, running a pnpm store prune to prune the store or manually installing dependencies via pnpm install --force and forcing a reinstall on packages will do the trick.

On our side, I'll check if we can upgrade the dependency version to a recent one so there won't be any troubles again. We're also planning to upgrade to @tabler/icons v2 for convenience which we assume is more stable about the breaking changes 😅 Also we're planning to do some changes about the way we handle dependencies and peer dependencies to avoid such issues with pnpm.

I'll link this issue when we have some progress in any of the steps listed above. 🚀

Let me know if this helps 🙏

@jamesknelson
Copy link
Author

@aliemir Thanks for the response!

As a quick solution, you can try running pnpm store add @tabler/icons@1.119.0 (latest v1 version tag) and let pnpm update its store with a more recent version. If this does not work, running a pnpm store prune to prune the store or manually installing dependencies via pnpm install --force and forcing a reinstall on packages will do the trick.

I've had a go at each of these workarounds, but nothing seems to work right now. Will stick with npm for now to get started, but would definitely like to be able to switch back to pnpm once it's working reliably.

@aliemir
Copy link
Member

aliemir commented Sep 21, 2023

Hey @jamesknelson, we've released an update in our @tabler/icons dependencies for related packages. This issue should be resolved if you update the dependencies to latest (in your case @refinedev/mantine) 🚀 Hope this helps 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants