Information Security Projects - Port Scanner - sh: 1: run: not found

What’s happening

So, I’m trying to do the Port Scanner certification project of the Information Security certification. As you may see in the project’s instructions, I must use Replit to complete this project.

When I try to run the project (and execute the tests), I get an error:

sh: 1: run: not found

The message varies according to the run command I set in here when I create the project:

I’ve tried many run commands including:

  • run
  • npm run start
  • npm run dev
  • run command (desperate attempt)

Even if I haven’t edited anything in the project, I get this error on run. I would expect the tests to run (and have none passing) when I run the project (with nothing edited in it).

The question

What can I do to fix this? Shall I just ignore the prompt?

My browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15

Challenge Information:

Information Security Projects - Port Scanner

Okay, I just found my mistake. For the project to run with no problem, just edit the .replit file so that the line specifying the run command looks like this:

run = ["python3", "main.py"]

It looked like this before:

run = ["sh", "-c", "npm run start"]

Actually, it makes sense as the challenge’s description says:

Click the “run” button and main.py will run.

I think it would run automatically if I just ignored the .replit file configuration.

1 Like