I got stuck in Html/CSS Part 3, Lesson 42 Parcel-Deployment

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. :slightly_smiling_face:

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.

1 Like

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.

image

I made spelling mistakes in URLs, and then that was corrected. The build was successful.

deletting .htmlnanorc.js file works for me

I solved it this way:

  1. 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 }
  2. In the Terminal I run the “parcel build index.html” adding “–no-minify” as a parameter:
    “parcel build index.html --no-minify”
  3. 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

Hope this will help you all

Ricardo

pls i need thew project file,
![codewithmosh|690x412](upload://rAzFal25I87BgkrvjW8FCquURES.

pls kindly send the link

I have installed v1.12.5. Then, the problem has gone.

Hi, was it solved? I’m facing similar issue, please see screenshot.
My node version is v18.18.0
ErrorParcel
Thanks

Hi again. It fails when try to build locally however It worked fine when deploying in parcel, so it is ok I think. Thanks