Error in executing JS code

What am i doing wrong here? Kindly help me here. I’m new coding world and learning

Welcome to the forums.

Can you please send a link to the Repl?

try moving your index.js out of the Web Development directory (aka folder).

1 Like

Did but still facing same error

Hmm, I checked the repl but you didn’t move it out. Can you send a screenshot of your Files tab?

It doesn’t let me take file out of the folder

If that’s the case, then rename your Web Development folder to Web-Development, go to the Shell tab and enter

mv Web-Development/index.js /home/runner/Web-development

Do try to avoid using spaces in folder and file naming.

1 Like

Did you mean:

mv Web\ Development/ /home/runner/Web-Development/

What? No, I didn’t mean that. What does that even mean? The syntax of mv is

mv [file] [directory]
1 Like

Huh? I think I have amnesia
your command moves index.js from a nonexistent directory (Web-Development) and renames it to Web-development (with a lowercase d), but doesn’t rename the directory Web Development to Web-Development. Nvm I’m wrong

What? I’m literally so confused right now. Let me explain:
OP renames the folder to Web-Development. This is the folder which his index.js file is in. It moves it to /home/runner/Web-development (the default directory of the Repl). This has a lowercase “d” as the Repl name has a lowercase “d”.

oh, you used /home/runner… I didn’t notice that. sorry I guess I also am suffering from blindness from staring at a screen for too long.

1 Like

Hey there, Thanks, it worked.

You could have just dragged the file to under the Packager files.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.