Host locally doesn't work

When I try to run the server.js file after downloading my project file from Glitch, it shows error:

Script: Desktop/bot/pixel-slave-2020-11-10_105504
Line: 1
Char: 1
Error: Syntax error
Code: 800A03AE
Source: Microsoft JScript compilation error

Running Windows 64bit lenovo laptop.
The project works fine inside glitch, anyone got any ideas?

Have you installed node? Are you using node to run the server.js file?
e.g.

node server.js

What’s on line 1?
@dj-pixel

2 Likes

If you haven’t installed Node.js, please install it the latest version or the LTS version from here.

2 Likes

It looks like you just clicked on the javascript file. You should instead open the Command Prompt and run node . in the folder that you want to run.

1 Like