atom-gpp-compiler
atom-gpp-compiler copied to clipboard
Uncaught TypeError: The "file" argument must be of type string. Received type undefined
[Enter steps to reproduce:]
- ...
- ...
Atom: 1.55.0 x64 Electron: 6.1.12 OS: Microsoft Windows 10 Home Single Language Thrown From: gpp-compiler package 3.0.7
Stack Trace
Uncaught TypeError: The "file" argument must be of type string. Received type undefined
At internal/validators.js:107
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
at validateString (internal/validators.js:107:11)
at normalizeSpawnArguments (child_process.js:406:3)
at Object.spawn (child_process.js:542:16)
at compile (/packages/gpp-compiler/index.js:274:31)
at compileFile (/packages/gpp-compiler/index.js:216:5)
at /packages/gpp-compiler/index.js:23:11)
at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.55.0/resources/app/static/<embedded>:11:350382)
at KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.55.0/resources/app/static/<embedded>:11:1230982)
at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.55.0/resources/app/static/<embedded>:11:1227116)
at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.55.0/resources/app/static/<embedded>:11:284879)
Commands
-7:04.4.0 core:paste (input.hidden-input)
15x -6:48.4.0 core:backspace (input.hidden-input)
-6:46.6.0 editor:delete-to-beginning-of-word (input.hidden-input)
14x -6:46.1.0 core:backspace (input.hidden-input)
-6:45.1.0 core:paste (input.hidden-input)
25x -6:08.8.0 core:backspace (input.hidden-input)
-6:07.1.0 core:paste (input.hidden-input)
-5:57.7.0 core:select-all (input.hidden-input)
-5:55.7.0 core:backspace (input.hidden-input)
-5:54.8.0 core:paste (input.hidden-input)
2x -5:05.4.0 gpp-compiler:compile (input.hidden-input)
4x -3:55 core:page-down (div.package-detail)
-3:52.1.0 core:move-down (div.package-detail)
-2:22.5.0 script:run-by-line-number (input.hidden-input)
-2:13.7.0 script:run (input.hidden-input)
12x -1:31.2.0 gpp-compiler:compile (div.line.cursor-line)
Non-Core Packages
atom-clock 0.1.18
atom-django 0.3.2
atom-python-run 0.9.7
autocomplete-math 0.1.1
autocomplete-python 1.17.0
g-code 1.1.0
gpp-compiler 3.0.7
ide-c-cpp 0.1.0
ide-cpp 0.1.0
ide-python 1.8.0
kite 0.204.0
linter 3.3.1
linter-gcc 0.9.0
linter-ui-default 3.3.1
platformio-ide-terminal 2.10.1
script 3.31.1
facing same issue , pls update
I am also having the same issue
same problem, did anyone solve the problem ? would be nice
I can't find a Solution! Anyone have any solutions?
i guess i know. #My situation: I was working with Python (everything worked) and then i wanted also to create some C++ files. I added c++ compiler. Run it. And c++ started to work but Python stoped... (here i got that error message)
#Solution: Go to Settings>Packages. Find another compiler package (another programming language) and click on Disable (in my situation i turned off c++ compiler).
After that the problem should be resolved.
Thanks @RaynorV I just disabled my keybindings in gpp compiler settings. There was keystroke "f5" runing command "gpp-compiler:compile". Now it works.
Anyone found a solution for this? I tried disabling the keystrokes, made no difference, I don't have another compiler package installed.
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
at validateString (internal/validators.js:112:11)
at normalizeSpawnArguments (child_process.js:407:3)
at Object.spawn (child_process.js:543:16)
at compile (/home/kali/.atom/packages/gpp-compiler/index.js:274:31)
at compileFile (/home/kali/.atom/packages/gpp-compiler/index.js:216:5)
at HTMLElement.gpp-compiler:compile (/home/kali/.atom/packages/gpp-compiler/index.js:23:11)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/static/
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
at validateString (internal/validators.js:112:11)
at normalizeSpawnArguments (child_process.js:407:3)
at Object.spawn (child_process.js:543:16)
at compile (/home/kali/.atom/packages/gpp-compiler/index.js:274:31)
at compileFile (/home/kali/.atom/packages/gpp-compiler/index.js:216:5)
at HTMLElement.gpp-compiler:compile (/home/kali/.atom/packages/gpp-compiler/index.js:23:11)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/static/
@macjaiswal100 I think you are trying run different code than C++ and atom is trying run it with gpp compiler. Try to disable all compilers without the one you need.
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
at validateString (internal/validators.js:112:11)
at normalizeSpawnArguments (child_process.js:407:3)
at Object.spawn (child_process.js:543:16)
at compile (/home/kali/.atom/packages/gpp-compiler/index.js:274:31)
at compileFile (/home/kali/.atom/packages/gpp-compiler/index.js:216:5)
at HTMLElement.gpp-compiler:compile (/home/kali/.atom/packages/gpp-compiler/index.js:23:11)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/static/
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
at validateString (internal/validators.js:112:11)
at normalizeSpawnArguments (child_process.js:407:3)
at Object.spawn (child_process.js:543:16)
at compile (/home/kali/.atom/packages/gpp-compiler/index.js:274:31)
at compileFile (/home/kali/.atom/packages/gpp-compiler/index.js:216:5)
at HTMLElement.gpp-compiler:compile (/home/kali/.atom/packages/gpp-compiler/index.js:23:11)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/static/
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
at validateString (internal/validators.js:112:11)
at normalizeSpawnArguments (child_process.js:407:3)
at Object.spawn (child_process.js:543:16)
at compile (/home/kali/.atom/packages/gpp-compiler/index.js:274:31)
at compileFile (/home/kali/.atom/packages/gpp-compiler/index.js:216:5)
at HTMLElement.gpp-compiler:compile (/home/kali/.atom/packages/gpp-compiler/index.js:23:11)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/static/
I can't find a Solution! Anyone have any solutions?
the solution that worked for me was by changing the keymap for python (you can change for either) go to settings >packages>select the package>view code>under keymaps change the config and relaunch atom
this fixed the problem for me
I had this exact problem just now. Both suggested solutions didn't work for me. What did is changing the name of my file to include the '.cpp' extension. For example: When I had the problem my file was called "test" The problem went away when I changed the file name to: "test.cpp"
Try that and see if it helps.
i found the same problem then i just tought that c/c++ are too compicated then i disable
i guess i know. #My situation: I was working with Python (everything worked) and then i wanted also to create some C++ files. I added c++ compiler. Run it. And c++ started to work but Python stoped... (here i got that error message)
#Solution: Go to Settings>Packages. Find another compiler package (another programming language) and click on Disable (in my situation i turned off c++ compiler).
After that the problem should be resolved.
Thanks mate it worked!
i facing same issue