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 undefined #410

Open fetyeen opened 2 years ago

fetyeen commented 2 years ago

Prerequisites

Description

Steps to Reproduce

Expected behavior:

Actual behavior:

Versions

Atom: 1.63.0-nightly1 x64 Electron: 11.5.0 OS: Unknown Windows version Thrown From: gpp-compiler package 3.0.7

Stack Trace

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

At internal/validators.js:120

TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received undefined
    at validateString (internal/validators.js:120:11)
    at normalizeSpawnArguments (child_process.js:415:3)
    at Object.spawn (child_process.js:551: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:27:11)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom-nightly/app-1.63.0-nightly1/resources/app/static/<embedded>:11:352694)
    at KeymapManager.dispatchCommandEvent (~/AppData/Local/atom-nightly/app-1.63.0-nightly1/resources/app/static/<embedded>:11:1228444)
    at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom-nightly/app-1.63.0-nightly1/resources/app/static/<embedded>:11:1224578)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom-nightly/app-1.63.0-nightly1/resources/app/static/<embedded>:11:286682)

Commands

     -7:51.6.0 gpp-compiler:compile (input.hidden-input)
     -7:46 core:save (input.hidden-input)
     -6:20.6.0 settings-view:open (input.hidden-input)
     -6:07.9.0 core:backspace (input.hidden-input)
     -4:35.3.0 core:confirm (input.hidden-input)
     -4:12.5.0 core:backspace (input.hidden-input)
  8x -4:12.1.0 core:confirm (input.hidden-input)
     -2:17.6.0 core:save (input.hidden-input)
     -0:19.8.0 core:paste (input.hidden-input)
     -0:16.5.0 gpp-compiler:gdb (input.hidden-input)

Non-Core Packages

gpp-compiler 3.0.7 

Additional Information

ItzzExcel commented 2 years ago

You have probably written some wrong line or function in the code.

hmibrahimhasan commented 2 years ago

If you run atom-python-run and gpp-compiler at the same time it will show you this error. So disabling gpp-compiler will not show this problem when you want to run Python. And when you run C then disabling atom-python-run will solve your problem.

I am a junior and this is the way I have solved my problem, please correct me if there is any mistake. And if anyone has an easier way, please share.