atom-gpp-compiler icon indicating copy to clipboard operation
atom-gpp-compiler copied to clipboard

Uncaught TypeError: The "file" argument must be of type string. Received type undefined

Open shaheer1999 opened this issue 5 years ago • 10 comments

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.48.0 x64 Electron: 5.0.13 OS: Microsoft Windows 10 Pro 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:105

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:105:11)
    at normalizeSpawnArguments (child_process.js:415:3)
    at Object.spawn (child_process.js:552: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.48.0/resources/app/static/<embedded>:11:349786)
    at KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:11:1242246)
    at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:11:1238380)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:11:284835)

Commands

     -1:51 symbols-view:toggle-project-symbols (input.hidden-input)
     -1:48 pane:reopen-closed-item (input.hidden-input)
  8x -0:58.4.0 gpp-compiler:compile (div.highlights)
  7x -0:21.3.0 gpp-compiler:gdb (input.hidden-input)
     -0:08.6.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

atom-clock 0.1.18 
atom-python-run 0.9.7 
gpp-compiler 3.0.7 
ide-c-cpp 0.1.0 
platformio-ide-terminal 2.10.0 
script 3.26.0 

shaheer1999 avatar Jun 28 '20 08:06 shaheer1999

hello guys I'm having this same issue! [Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.48.0 x64 Electron: 5.0.13 OS: Microsoft Windows 10 Pro 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:105

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:105:11)
    at normalizeSpawnArguments (child_process.js:415:3)
    at Object.spawn (child_process.js:552:16)
    at compile (/packages/gpp-compiler/index.js:274:31)
    at HTMLLIElement.treeCompile (/packages/gpp-compiler/index.js:251:3)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:11:349786)
    at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:11:348261)
    at AtomEnvironment.dispatchContextMenuCommand (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:1:765638)
    at EventEmitter.t (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:1:773644)
    at EventEmitter.emit (events.js:194:13)

Commands

  4x -8:57 core:backspace (input.hidden-input)
     -5:12.4.0 intentions:highlight (input.hidden-input)
     -5:12.1.0 core:save (input.hidden-input)
     -5:06.1.0 gpp-compiler:tree-compile (span.name.icon.c-icon.medium-blue)

Non-Core Packages

atom-beautify 0.33.4 
atom-coffee-repl 0.1.0 
atom-compile-coffee 1.6.0 
atom-emmet-css-in-js 0.2.0 
atom-formatter-jsbeautify 1.1.2 
atom-include-path 0.1.0 
atom-isort 2.6.5 
atom-python-run 0.9.7 
auto-c-header 0.1.0 
autocomplete-clang 0.13.1 
autocomplete-html-entities 0.2.0 
build 0.70.0 
build-coffee 0.8.2 
build-python 0.12.1 
busy-signal 2.0.1 
clang-format 2.0.8 
coffee-autocompile 0.7.0 
coffee-check 0.0.3 
coffee-links 0.1.0 
coffee-navigator 0.0.18 
coffee-paste 0.8.0 
coffee-porter 0.8.1 
cpp-compile-on-save 0.1.1 
css-spy 0.6.0 
cssbeautify 1.3.0 
devmind-beautifier 1.3.0 
emmet 2.4.3 
emmet-simplified 2.6.0 
file-icons 2.1.41 
formatter-jsbeautify 1.0.2 
gcc-make-run 0.2.12 
gpp 0.5.0 
gpp-compiler 3.0.7 
html-presets 1.1.2 
html-tag-auto-complete 0.1.1 
ide-c-cpp 0.1.0 
ide-css 0.3.4 
ide-python 1.5.0 
intentions 1.1.5 
language-amigaos-c 1.3.5 
language-c-script 0.3.3 
language-gpp 0.1.0 
language-gpptool 0.1.0 
language-openacc 0.2.6 
linter 2.3.1 
linter-gcc 0.9.0 
linter-gcc-with-avr 0.1.4 
linter-ui-default 1.8.1 
linter-urho3dlinter 0.2.4 
make-coffee 0.1.1 
make-html-code 1.4.0 
platformio-ide-terminal 2.10.0 
pretty-html 1.0.0 
python-autopep8 0.1.3 
python-black 0.7.0 
python-tools 0.6.9 
tool-bar 1.3.0 
tool-bar-main 0.0.12 

exstra avatar Jul 05 '20 21:07 exstra

I having the same problem. What should i do?

UltimateZCoder avatar Jul 05 '20 22:07 UltimateZCoder

I got this error because I didn't put the .c extension to the file. Hope this helps.

Juedquipa avatar Jul 07 '20 03:07 Juedquipa

Capture i fixed that by changing the file grammer from C++14 to C++ and it compiles just fine after that

raid-teyar avatar Jul 19 '20 15:07 raid-teyar

I got this error aswell. Turns out I forgot to capitalize the name of my class.

PetrosDiomedous avatar Jul 22 '20 08:07 PetrosDiomedous

same

ghost avatar Aug 05 '20 09:08 ghost

same error. not a clue how to fix this or how to compile in atom. can anyone clearly explain step by step how to get gpp to compile.

#include

int main() { std::cout << "Hello World!\n"; }

I added the gpp compiler package. frustrating this won't work.

ALBUE avatar Aug 28 '20 20:08 ALBUE

Capture i fixed that by changing the file grammer from C++14 to C++ and it compiles just fine after that

Thank you very very much. I fixed the issue wıth your help.

Baharix avatar Nov 30 '20 19:11 Baharix

this is causing my python code to not run

SpeedrunnerG55 avatar Apr 17 '21 03:04 SpeedrunnerG55

this is causing my python code to not run

sameeeeee

ayushidera avatar Apr 17 '21 16:04 ayushidera