Problem with parcel build index.html

Dear Everyone,

I am new to this programming world, and currently I am learning the Ultimate HTML5 & CSS3 series: Part 3.
Under the Building for Production section, I am experiencing the problem.
When I run with parcel build index.html, it gives error something like C:\Users\Wow\Desktop\Moshify\index.html: tree.render is not a function.

So, if some body helps me to fix this issue, its much appreciable and thankful.
Thanks in advance!

2 Likes

Can you please share the complete error message? Also, if possible, please also share relevant code snippet(s).

Hi Sufian,

Thanks very much for your reply and the error details are as given below:

Thanks

1 Like

In root i.e. in MOSHIFY folder

  1. create a file called “.htmlnanorc.js” (with no quotes “”)
  2. paste below code and save it and then run ‘parcel build index.html’.

module.exports = {
minifySvg: false
}

9 Likes

Thanks very much for your great help!

Thank you, it works!!

1 Like

I did this and works. But, when a try to commit, I get and error.
Can you help me??

This is the file that I added to solve the first problem

I fixed it. I closed VSCode and opened it again. Thanks anyway

My problem after this was that Netlify would not deploy successfully. It keeps telling me that “No such file or directory”

I tried the 1.12.3 ver of parcel as some have tried and wroked for them, but I still dont know what the problem is, has anybody encountered this?

1 Like

Hello Bro
I have a problem in this step.How do I have to solve this step

Just remove “sudo” from the command.

The “sudo” part only runs of Mac and Linux.

Thanks bro.I will try it.

Hey Bkomesu,
did you get a solution for this problem?

Hey everyone,

Guys need your help

I got stuck on running index.html with parcel.

when i hit “parcel index.html” I’m getting the following error:

PS D:\coding\Moshify> parcel index.html
parcel : Unable to upload file C:\Users\Orazbek\AppData\Roaming\npm\parcel.ps1, because scripting is disabled on this system.
For more information see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
string:1 character:1

  • parcel index.html
  •   + CategoryInfo          : security bug: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess

Ayo, thank you so much.

I have been trying to build by installing globally on my Mac, using: Sudo npm I -g parcel bundler but it’s not been possible and I couldn’t get any password prompt . I got errors that I need to use -s. I don’t understand. Do I need to configure or do what to get through this stage?
Thanks

Hello everyone. Please,

I have been trying to build by installing globally on my Mac, using: sudo npm i -g parcel bundler but it’s not been possible and I couldn’t get any password prompts as explained by Mosh. I got errors that I need to use -s etc. Which I have tried it didn’t
work. I can’t understand why?. Do I need to configure or do what to get through this stage?
Thanks

Please post the exact error message here.

Thank you so much Mr. Sufian,

I have attached


the photo response.

Thanks,
Jo