-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
[v1] Unable to locate @iconify-json/*
packages on build when installed with pnpm, npm
#173
Comments
Everything (build, dev, etc.) fails when doing it with npm (at least for me). The same error as in #165...Also tried yarn. I have all three icon packs I use installed as regular dependencies: "dependencies": {
"@iconify-json/fa-brands": "^1.1.8",
"@iconify-json/mdi": "^1.1.63",
"@iconify-json/twemoji": "^1.1.15"
} and also included them in the config, to be sure (also doesn't work either way). Maybe the package.json checking is more reliable? Even if it would allow for it to not be installed, but just only added, which seems pretty unlikely if you also have astro etc. installed. I was able to make it work by removing the if else statement of https://github.com/natemoo-re/astro-icon/blob/main/packages/core/src/loaders/loadIconifyCollections.ts#L94-L114. |
@natemoo-re I hope this helps. Seems to be the issue of all the recent v1 issues created here. For now, I'd remove the else statement as a hotfix and work on the else statement a bit more :) |
@Pukimaa thanks for adding your notes here :) it's interesting you're also seeing this issue in dev. That is fine on my end, and in my brief digging the |
What version of
astro-icon
are you using?v1.0.0
Astro Info
If this issue only occurs in one browser, which browser is a problem?
n/a
Describe the Bug
similar error to #165, but when using pnpm builds are failing. when poking around the repo and debugging this, it appears
pnpm list
's behavior changes depending on howNODE_ENV
is set:vs without
NODE_ENV
This also appears to fail with npm, yielding a similar result.
should this just always default to reading the package.json file?
astro-icon/packages/core/src/loaders/loadIconifyCollections.ts
Line 94 in cb25022
it doesn't look like you can run something like
NODE_ENV=production pnpm list --json --dev
without also omittingdependencies
, which may be undesirableWhat's the expected result?
iconify packages are resolved when installed as devDependencies
Link to Minimal Reproducible Example
https://github.com/josefaidt/josef.dev/blob/v3
The text was updated successfully, but these errors were encountered: