complete-javascript-course icon indicating copy to clipboard operation
complete-javascript-course copied to clipboard

SVG doesn't load in browser

Open carmennnnandra opened this issue 3 years ago • 11 comments

Hello, Jonas! On forkify application, svg doesn t appear on browser Can you help me ? Thank you

carmennnnandra avatar Mar 17 '21 21:03 carmennnnandra

Yes i am having the same issue. Install parcel beta 2 version which is the latest it. After building with parcel only the svg icons of the header are not rendered...couldn't figure out the issue.

forkify

Safeeerrr avatar Mar 18 '21 01:03 Safeeerrr

Yes i am having the same issue. Install parcel beta 2 version which is the latest it. After building with parcel only the svg icons of the header are not rendered...couldn't figure out the issue.

forkify

And you downloaded the same icons.svg like Jonas, right?

carmennnnandra avatar Mar 18 '21 07:03 carmennnnandra

Got the same problem, try to: -reinstall parcel, I have v2 -rewrite this import icons from 'url:../img/icons.svg'; -restart the textEditor, pc, npm start etc for me worked after reinstall. Hope it helps.

banicaDaniel07 avatar Mar 27 '21 15:03 banicaDaniel07

now i have this error '@parcel/transformer-js: This experimental syntax requires enabling one of the following parser plugin(s): 'classPrivateProperties, classPrivateMethods' (2:4) ' and i didn't solve

this is my json { "name": "licenta_carmen", "version": "1.0.0", "description": "Recipe application", "main": "index.html", "scripts": { "start": "parcel index.html", "build": "parcel build index.html" }, "author": "Melniciuc Carmen Andra", "license": "ISC", "devDependencies": { "@babel/plugin-proposal-private-methods": "^7.13.0", "@parcel/transformer-sass": "^2.0.0-beta.2", "parcel": "^2.0.0-beta.2" }, "dependencies": { "core-js": "^3.9.1", "regenerator-runtime": "^0.13.7" }

}

carmennnnandra avatar Mar 28 '21 19:03 carmennnnandra

I have the same issue using parcel 2.0.0beta2 it loads them properly but the browser can't show them :( I tried different browsers but any of them worked :(

AmirVahedix avatar Apr 04 '21 12:04 AmirVahedix

I had the same issue, using Parcel 2.0.0beta2. The icons in the top banner did not render, yet they appear to be there if you inspect the page (image attached). They rendered in the recipe list fine though. Icon Error

SStranks avatar May 20 '21 20:05 SStranks

Any Fix till now ?

pranjalg131 avatar Jun 10 '21 06:06 pranjalg131

Any Fix till now ?

Just use the version same to jonas by doing npm uninstall parcel npm install [email protected] npm start

It worked for me

pranjalg131 avatar Jun 10 '21 07:06 pranjalg131

Any Fix till now ?

Just use the version same to jonas by doing npm uninstall parcel npm install [email protected] npm start

It worked for me

This solution worked.

While building the app, in case faced error: index.html: tree.render is not a function add .htmlnanorc.js to project root with the following: module.exports = { "minifySvg": false }

Alieltahan avatar Jul 30 '21 07:07 Alieltahan

Just use the version same to jonas by doing npm uninstall parcel npm install [email protected] npm start

It worked for me

Any Fix till now ?

Just use the version same to jonas by doing npm uninstall parcel npm install [email protected] npm start It worked for me

This solution worked.

While building the app, in case faced error: index.html: tree.render is not a function add .htmlnanorc.js to project root with the following: module.exports = { "minifySvg": false }

to fix index.html: tree.render is not a function add a file named 18-forkify\.htmlnanorc and add

{
  "minifySvg": false
}

Felixmurithi avatar Nov 21 '23 09:11 Felixmurithi