You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user inputs "node lab1.js -v" or "--version", the app gives an error.
PS C:\Users\raymo\Documents\3yearseneca\OSD600\testingrepos\OSD600-Release0.1\BrokenLinkChecker- Release 0.1> node lab1.js -v
internal/fs/utils.js:269
throw err;
Error: ENOENT: no such file or directory, open '-v'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object.<anonymous> (C:\Users\raymo\Documents\3yearseneca\OSD600\testingrepos\OSD600-Release0.1\BrokenLinkChecker- Release 0.1\lab1.js:29:23)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: '-v'
}
I suggest changing the arguments checker to this:
if (process.argv[2] == **"-v"** || process.argv[2] == **"--version"**) {
console.log(packageJson.name + " Version " + packageJson.version);
}
from what it was originally
The text was updated successfully, but these errors were encountered:
When the user inputs "node lab1.js -v" or "--version", the app gives an error.
I suggest changing the arguments checker to this:
from what it was originally
The text was updated successfully, but these errors were encountered: