Hi,
My name is Saqib, I almost completed my HTML/CSS journey but unfortunately I got stucked at Lesson 42 of Part 3 while deploying my website using PARCEL.
I did the same as Mosh described but error appears everytime I run index.html with PARCEL.
I also searched and tried different ways and hacks, but nothing works for me. I’m sharing this problem with you guys because I hope someone has a solution that will work.
These are the Errors coming…
Server running at http://localhost:1234
× C:\Users\DELL\OneDrive\Desktop\Moshify\images\logo.svg: Invalid Version: undefined
at new SemVer (C:\Users\DELL\OneDrive\Desktop\Moshify\node_modules@babel\preset-env\node_modules\semver\semver.js:314:11)
at compare (C:\Users\DELL\OneDrive\Desktop\Moshify\node_modules@babel\preset-env\node_modules\semver\semver.js:647:10)
at Function.lt (C:\Users\DELL\OneDrive\Desktop\Moshify\node_modules@babel\preset-env\node_modules\semver\semver.js:688:10)
Many people are stuck in this part of the course. I tried so many youtube tutorials but always ended up with a problem. I disregarded this part for learning purposes.
I hope this is solved now if any future developers are facing this issue. Please check the URLs (like https:// mistakes) in your code (index.html) so that you can build your website on a local server.
In the project directory:
a) Created a file called “.htmlnanorc.js” with content:
module.exports = {
minifySvg: false,
};
b) Created another file called “.htmlnanorc” with a single line:
{ “minifySvg”: false }
In the Terminal I run the “parcel build index.html” adding “–no-minify” as a parameter:
“parcel build index.html --no-minify”
In the configuration parameters of Netlify for the deploy, I also write the same command to be executed when building my deploy:
“parcel build index.html --no-minify”
All problems are gone and now anytime I push to GitHub, Netlify publish my updated site as expected