kriscross07 / atom-gpp-compiler

An atom package that allows you to compile and run C++ and C within the editor.
https://atom.io/packages/gpp-compiler
80 stars 228 forks source link

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

Open shaheer1999 opened 4 years ago

shaheer1999 commented 4 years ago

[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 
exstra commented 4 years ago

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 
UltimateZCoder commented 4 years ago

I having the same problem. What should i do?

Juedquipa commented 4 years ago

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

raid-teyar commented 4 years ago

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

PetrosDiomedous commented 4 years ago

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

ghost commented 4 years ago

same

ALBUE commented 4 years ago

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.

Baharix commented 3 years ago

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.

SpeedrunnerG55 commented 3 years ago

this is causing my python code to not run

ayushidera commented 3 years ago

this is causing my python code to not run

sameeeeee