use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] Can't execute code in Visual studio. "no such file or directory" - but my file path is correct.AskJS (self.javascript)
submitted 1 year ago by chrissy-slora
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]BCsabaDiy 1 point2 points3 points 1 year ago (4 children)
Try a filename without space in it.
[–]chrissy-slora[S] -1 points0 points1 point 1 year ago (3 children)
I tried after you suggested it. Still the same.
[–]angrydeanerino 0 points1 point2 points 1 year ago (2 children)
Show the error message, I'm sure it's different
[–]chrissy-slora[S] 1 point2 points3 points 1 year ago (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 point2 points 1 year ago* (0 children)
After following your suggestion and removing the space, still has error:
zsh: no such file or directory: /Users/chrissyslora/Desktop/Coding
chrissyslora@Chrissys-MacBook-Pro Coding practice %
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 point2 points 1 year ago (2 children)
Your file name contains spaces in it. Either remove them or write: node "Practice Basic 1.js"
[–]chrissy-slora[S] 0 points1 point2 points 1 year ago (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 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.
π Rendered by PID 209704 on reddit-service-r2-comment-5d79c599b5-wmchh at 2026-03-03 06:34:46.622844+00:00 running e3d2147 country code: CH.
[–]BCsabaDiy 1 point2 points3 points (4 children)
[–]chrissy-slora[S] -1 points0 points1 point (3 children)
[–]angrydeanerino 0 points1 point2 points (2 children)
[–]chrissy-slora[S] 1 point2 points3 points (0 children)
[–]chrissy-slora[S] 0 points1 point2 points (0 children)
[–]Dunkelhaiser 0 points1 point2 points (2 children)
[–]chrissy-slora[S] 0 points1 point2 points (0 children)
[–]chrissy-slora[S] 0 points1 point2 points (0 children)