How to set web server?

Hello @naimiii :grinning:

If you’re trying to start express web server in node -

  1. You have to install express from npm packages and require it in code.
    Ref link -

  2. Type node <your file name> or you can also try nodemon (reload automatically)

Ref link -

It would be helpful in future if you actually explained what you’re doing instead of posting a screenshot over and over again. You’re asking people to figure out what you’re doing, figure out what software you’re trying to run, find the repo you cloned it from, search through the documentation, etc.

All the advice in the various threads you have posted up until now has been wrong (including what I posted) because of the above: you haven’t explained what you’re doing so no-one actually gave you any advice that was actually relevant.

If you go on that repo, and look in the issues, then you find this:

The command to run the server will not work out-of-the-box on Windows; the Mozilla team working on it seem to be using Macs/Linux machines, so it would not be an issue for them, but for you it will not Just Work from the Windows command prompt.

If you have Windows Bash subsystem, then you should be able to run it from there, but I assume if you’re on Windows 10 you don’t.

So for basic fix, you will need to patch the code, and the following should work:

  1. in that specific root folder (\taskcluster\services\web-server), run
    yarn add cross-env
  2. open the package.json, and change the line
    "start": "NODE_ENV=development node src/main.js devServer",
    "start": "cross-env NODE_ENV=development node src/main.js devServer",

There seem to be similar issues on other Taskcluster apps as well (the issue states the ui package has the same problem), so if you get any similar errors you’ll need to go into the package root folder for each one that throws an error and carry out the same process.

1 Like