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
Describe the bug
When trying to run application with files as attribute have a failure:
./App.-x86_64.AppImage /home/user/file.txt
PFS0
^
SyntaxError: Invalid or unexpected token
at Object.compileFunction (vm.js:344:18)
at wrapSafe (internal/modules/cjs/loader.js:1106:15)
at Module._compile (internal/modules/cjs/loader.js:1140:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
When I try to splice process.argv
const openedFiles = process.argv.splice(1);
Have an error:
./App.-x86_64.AppImage /home/user/file.txt
internal/validators.js:121
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:121:11)
at Object.resolve (path.js:980:7)
at resolveMainPath (internal/modules/run_main.js:12:40)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:65:24)
at internal/main/run_main_module.js:17:47 {
code: 'ERR_INVALID_ARG_TYPE'
}
Without packing to AppImage it work with splice 2 elements of process.argv: const openedFiles = process.argv.splice(2); npm start /home/user/file.txt
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying to run application with files as attribute have a failure:
When I try to splice process.argv
Have an error:
Without packing to AppImage it work with splice 2 elements of process.argv:
const openedFiles = process.argv.splice(2);
npm start /home/user/file.txt
The text was updated successfully, but these errors were encountered: