Closed calebbg closed 2 years ago
An interesting wrinkle to this, it appears to be working in the autograder, just not locally on my machine. That is assuming I understand the autograder tests correctly. I would still be interested to hear any theories as to why this might be.
I have the same error occurring but it is happening on a03.
Hello Caleb,
Apologies for the delay in response for this issue. I would recommend looking closely at your package.json file. The "name" should point to "galosh.js" and not simply "galosh". This may by the cause for the error, as galosh.js may not be found since it hasn't been written formally in your json file. Also, make sure your "main" points to "cli.js" and not "index.js" as there should be no index.js file for this assignment.
Let me know whether this clears up your issues.
Kaival (and Caleb if the above doesn't fix your issue),
For your issue, it seems that the file node_modules has CRLF (Windows) line endings instead of LF (Linux) (\r instead of \n). You can fix this locally by finding the file locally and changing the line endings using an editor like VSCode or dos2unix.
Here is how to do it via dos2unix but it may be easier to do it manually in VSCode
What is happening?
"node cli.js" is working as intended, but trying to run the program with "galosh.js" is not working. I have inserted the bin and type:module statements in package.json, and I have run "npm link".
What does the error say is happening?
The error says there is no file or directory called galosh.js in the node environment.
What do you think the error means?
I'm honestly not sure why this would not be working, as I followed the steps listed in the a02 readme. It seems like something is not linking properly.
Command string
galosh.js -s 35.014 -w 79.4545 -z America/New_York -d 3 galosh.js -h galosh.js
Code snippet
Screenshots
Error log
/usr/bin/env: ‘node\r’: No such file or directory
Node.js version
v16.17.0
Operating system
Linux UNC-R90YDFXE 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux