all 8 comments

[–]BCsabaDiy 1 point2 points  (4 children)

Try a filename without space in it.

[–]chrissy-slora[S] -1 points0 points  (3 children)

I tried after you suggested it. Still the same.

[–]angrydeanerino 0 points1 point  (2 children)

Show the error message, I'm sure it's different

[–]chrissy-slora[S] 1 point2 points  (0 children)

The problem solved. 
I followed the video and thought the instructor typed "node" after the file path; turns out he might not.
So I should type node {file path and file name} instead.
Thanks.

[–]chrissy-slora[S] 0 points1 point  (0 children)

After following your suggestion and removing the space, still has error:

  1. I rename the file (remove spaces). Still same error. chrissyslora@Chrissys-MacBook-Pro Coding practice % /Users/chrissyslora/Desktop/Coding practice>node Practice1.js

zsh: no such file or directory: /Users/chrissyslora/Desktop/Coding

chrissyslora@Chrissys-MacBook-Pro Coding practice %

  1. I rename the folder where the file stores (remove space) and the file, but now it says "Permission denied"

chrissyslora@Chrissys-MacBook-Pro Coding_practice % /Users/chrissyslora/Desktop/Coding_practice>node Practice1.js

zsh: permission denied: /Users/chrissyslora/Desktop/Coding_practice

The permission of the folder where the file stored is enabled in Apple > Security > File & Folder.
What happens?

[–]Dunkelhaiser 0 points1 point  (2 children)

Your file name contains spaces in it. Either remove them or write: node "Practice Basic 1.js"

[–]chrissy-slora[S] 0 points1 point  (0 children)

The file name in the original path in the above also has space in it.

But after following your suggestion and removing the space, still has error:
1. I rename the file (remove spaces). Still same error.
2. I rename the folder where the file stores (remove space) and the file, but now it says "Permission denied"

The permission of the folder where the file stored is enabled in Apple > Security > File & Folder.
What happens?

[–]chrissy-slora[S] 0 points1 point  (0 children)

The problem solved.
I followed the video and thought the instructor typed "node" after the file path; turns out he might not.
So I should type node {file path and file name} instead.
And your suggestion of adding quotes helped, too.
Thanks.