tailwindlabs / heroicons

A set of free MIT-licensed high-quality SVG icons for UI development.
https://heroicons.com
MIT License
21.03k stars 1.27k forks source link

[Bug] Missing "./24/outline/" specifier in "@heroicons/react" package #940

Closed DrJume closed 1 year ago

DrJume commented 1 year ago

Discussed in https://github.com/tailwindlabs/heroicons/discussions/925

Originally posted by **BrunoEleodoro** February 4, 2023 Hey guys, I've been using vite and heroicons on my project but now it's showing me an error when I try to `yarn build`, can someone help me with that? ``` bruno@MacBook-Pro app % yarn build yarn run v1.22.17 $ tsc && vite build vite v4.1.1 building for production... ✓ 30 modules transformed. [commonjs--resolver] Missing "./24/outline/" specifier in "@heroicons/react" package error during build: Error: Missing "./24/outline/" specifier in "@heroicons/react" package at e (file:///Users/bruno/Projetos/onbeef-extension/app/node_modules/vite/dist/node/chunks/dep-3007b26d.js:14845:25) at n (file:///Users/bruno/Projetos/onbeef-extension/app/node_modules/vite/dist/node/chunks/dep-3007b26d.js:14845:627) at o (file:///Users/bruno/Projetos/onbeef-extension/app/node_modules/vite/dist/node/chunks/dep-3007b26d.js:14845:1276) at resolveExports (file:///Users/bruno/Projetos/onbeef-extension/app/node_modules/vite/dist/node/chunks/dep-3007b26d.js:22032:20) at resolveDeepImport (file:///Users/bruno/Projetos/onbeef-extension/app/node_modules/vite/dist/node/chunks/dep-3007b26d.js:22051:31) at tryNodeResolve (file:///Users/bruno/Projetos/onbeef-extension/app/node_modules/vite/dist/node/chunks/dep-3007b26d.js:21736:20) at Object.resolveId (file:///Users/bruno/Projetos/onbeef-extension/app/node_modules/vite/dist/node/chunks/dep-3007b26d.js:21487:28) at file:///Users/bruno/Projetos/onbeef-extension/app/node_modules/rollup/dist/es/shared/rollup.js:23889:40 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async PluginDriver.hookFirstAndGetPlugin (file:///Users/bruno/Projetos/onbeef-extension/app/node_modules/rollup/dist/es/shared/rollup.js:23789:28) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ```
DrJume commented 1 year ago

All context and info is already provided in discussion #925

thecrypticace commented 1 year ago

@DrJume Is there a reason to use import … from "@heroicons/react/24/outline/" over import … from "@heroicons/react/24/outline" without the trailing /?

DrJume commented 1 year ago

I don't know. I used it without trailing slash and the same error occurred as seen in the discussion.

thecrypticace commented 1 year ago

Could you provide a reproduction for me to look at?

reinink commented 1 year ago

Hey! Going to close this one because we haven't heard back with a reproduction. If you'd like to still provide a simple reproduction as a Git repo, we can have another look 👍