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: Callback must be a function. Received undefined #395

Open bhavanareddy1 opened 3 years ago

bhavanareddy1 commented 3 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.58.0 x64 Electron: 9.4.4 OS: Microsoft Windows 10 Home Single Language Thrown From: gpp-compiler package 3.0.7

Stack Trace

Uncaught TypeError: Callback must be a function. Received undefined

At fs.js:135

TypeError [ERR_INVALID_CALLBACK] [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
    at maybeCallback (fs.js:135:9)
    at Object.writeFile (fs.js:1234:14)
    at /packages/gpp-compiler/index.js:299:12)
    at ChildProcess.emit (events.js:223:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

Commands

     -7:24.6.0 core:save-as (input.hidden-input)
  2x -6:56.6.0 gpp-compiler:compile (div.line.cursor-line)
     -6:26.2.0 core:save (input.hidden-input)
  3x -6:16.9.0 gpp-compiler:compile (div.highlights)

Non-Core Packages

gpp-compiler 3.0.7 
ide-python 1.9.3 
DMallqui56 commented 3 years ago

I have the same problem.

forjin14 commented 3 years ago

how do you fix it

hadytech commented 3 years ago

can't compile brothers

theyashl commented 3 years ago

All I did is renamed file with valid .cpp extension lol. Maybe my problem was different I guess, but you can try if it works for you!

Sveske-Juice commented 3 years ago

same problem for me here

Sveske-Juice commented 3 years ago

Wait im stupid, it was because i didn't use the int main() function..

conancamargo commented 3 years ago

I Unistalled the gpp compiler and install GCC Make Run Package with TDM-GCC. I tried do so much things in the internet for two days and nothing. But now i run and compiler input and output perfectly. Worked for me. Try you too, maybe you have the same luck that i.

deezdata commented 3 years ago

Why are you seeing this problem if you are just starting to learn somekind of language in Atom IDE (ex. C) o/ It's default problem link in Atom. I've been doing some mistakes while learning and everytime when i was clicking View Issue I've been sent to this issue. For future just google the problem or try to fix it by yourself.