Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Windows 10 : A Javascript Error occurred in the main process

  • #6537
    Avatar photo[anonymous]

    Version : 0.38.3

    I tried to launch Publii today as usual, but I kept getting an error with the following message :

    A javascript error occured in the main process.

    Uncaught exception:

    Syntax error : Unexpected token

    I googled it and found a few blog posts and youtube videos about a similar bug on the discord desktop app for Windows 10.

    Unfortunately, I didn’t get much success with those solutions.

    Here are a few links to those articles :

    I’m stuck right and I’d be really glad to get some help.

    Thanks.

    #6539
    Avatar photo[anonymous]

    Hi,

    It seems that one of the JSON config files is corrupted.

    Please try the following:

    1) Rename Publii/config directory to Publii/__config – if Publii will start then we will need to check your app config files

    2) If above point won’t help – please rename Publii/sites catalog to Publii/__sites and create new empty Publii/sites catalog. If Publii will start properly, then problem is connected with one of your sites configuration.

    #6547
    Avatar photo[anonymous]

    Thank you, Tomasz.

    Your solution worked perfectly.

    I checked the config directory of the last site I modified when Publii was still working.

    The sites.config.json file was completely corrupted.

    I just had to replace it with the same file from my last backup to make Publii work again.

    Thank you very much.

    #6548
    Avatar photo[anonymous]

    Great to hear 🙂