torcado194/worm

Unable to use worm because of Invalid arg type

Opened this issue · 1 comments

whenever I try to run worm i get this error
could not find file TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined at Object.openSync (node:fs:591:10) at Object.readFileSync (node:fs:467:35) at init (/home/maxgallo/Downloads/worm/worm.js:42:25) at Object.<anonymous> (/home/maxgallo/Downloads/worm/worm.js:148:1) at Module._compile (node:internal/modules/cjs/loader:1120:14) at Module._extensions..js (node:internal/modules/cjs/loader:1174:10) at Module.load (node:internal/modules/cjs/loader:998:32) at Module._load (node:internal/modules/cjs/loader:839:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47 { code: 'ERR_INVALID_ARG_TYPE' }

hi,
please make sure you are providing a path to the file that contains the code you wish to run. for example, if you wrote your worm program in a file called program.worm in the same directory as the main worm.js file, you should run the following command:

node worm.js program.worm

if your worm program file is in another directory, the command would look like something like this:

node worm.js /path/to/program.worm

check the readme for more examples of how to use the command line interface
if you are still having issues, let me know!