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

icons not showing #452

Open
shubhs27 opened this issue Feb 4, 2025 · 6 comments
Open

icons not showing #452

shubhs27 opened this issue Feb 4, 2025 · 6 comments

Comments

@shubhs27
Copy link

shubhs27 commented Feb 4, 2025

Image

the icons are not showing on the website after deploying to both netlify and vercel but showing on localhost

@vaishnavinakhate
Copy link

could you please describe the issue more, id like to work on it.

@shubhs27
Copy link
Author

shubhs27 commented Feb 5, 2025

the icons are not loading after deploying the site on netlify but they were working correctly when running on local host. Rest all the functionality is working properly.

@Ray-817
Copy link

Ray-817 commented Feb 7, 2025

Hi @shubhs27 I've got the same problem! Have u find the solution yet? I check the devtool of chorme, at the sources plate there's no svgs files but the logo of forkify, just like your pic shows, only the logo of forkify appears.

@shubhs27
Copy link
Author

shubhs27 commented Feb 8, 2025

Haven't found a solution :(

@akozdev
Copy link

akozdev commented Feb 9, 2025

Can you see any errors in the browser console?
After you build your project with npm run build locally, can you see the icons.svg file in the dist directory? Do the icons work if you open the app in the browser locally?

Can you also share your package.json file?

@Ray-817
Copy link

Ray-817 commented Feb 9, 2025

Hi @akozdev
When the application run on the netilify there's no errors in the browser console.(And no error when it run on the local host)
Yes, after running npm run build locally, there are svg files in the dist directory.
Image
And the icons work perfectly on my localhost.
Here's my package.json file:

{
  "name": "forkify",
  "version": "1.0.0",
  "description": "Search over 1,000,000 recipes",
  "defult": "index.html",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "rmdir /s /q .parcel-cache && parcel index.html",
    "build": "rmdir /s /q .parcel-cache && parcel build index.html --dist-dir ./dist"
  },
  "author": "Ray",
  "license": "ISC",
  "devDependencies": {
    "@parcel/transformer-sass": "^2.13.3",
    "parcel": "^2.13.3",
    "parcel-transformer-svg-sprite": "^2.0.1",
    "sass": "^1.83.0",
    "svgo": "^3.3.2"
  },
  "dependencies": {
    "core-js": "^3.39.0",
    "fraction.js": "^5.2.1",
    "regenerator-runtime": "^0.14.1"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants