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 #347

Closed ViralJain321 closed 1 year ago

ViralJain321 commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

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

Stack Trace

Uncaught TypeError: Callback must be a function

At fs.js:138

TypeError [ERR_INVALID_CALLBACK] [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:138:9)
    at Object.writeFile (fs.js:1215:14)
    at /packages/gpp-compiler/index.js:299:12)
    at ChildProcess.emit (events.js:194:13)
    at maybeClose (internal/child_process.js:998:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)

Commands

     -2:00.9.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

gpp-compiler 3.0.7 
platformio-ide-terminal 2.10.0 
J4mes-B4rnett commented 4 years ago

Same problem here, no matter what I do, it won't work

agarwaladitya0401 commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

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

Stack Trace

Uncaught TypeError: Callback must be a function

At fs.js:138

TypeError [ERR_INVALID_CALLBACK] [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:138:9)
    at Object.writeFile (fs.js:1215:14)
    at /packages/gpp-compiler/index.js:299:12)
    at ChildProcess.emit (events.js:194:13)
    at maybeClose (internal/child_process.js:998:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)

Commands

     -2:00.9.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

gpp-compiler 3.0.7 
platformio-ide-terminal 2.10.0 

Same problem here, no matter what I do, it won't work

use "using namespace std;" before int main(){..} .

cristhianocunha commented 4 years ago

I also have this same problem, I do as the tutorial says and nothing .. put a code that I find on google and nothing ..

cristhianocunha commented 4 years ago

Hello, I was reading a little more and saw that the error is due to the lack of a ccls server.I haven't solved the problem yet. but if someone here resolves let me know

ghost commented 4 years ago

Just reinstall MinGW using https://www.youtube.com/watch?v=xwRoQ5GkwJI It will most probably solve your Problem.

agarwaladitya0401 commented 4 years ago

Just reinstall MinGW using https://www.youtube.com/watch?v=xwRoQ5GkwJI It will most probably solve your Problem.

same error brother :(

Tanmay1903 commented 4 years ago

I had the same error as well. I just changed the code a little bit. I used 'using namespace std;' below the header files and changed the datatype of main function to int main(). Hope this resolves the error. If not, please share your code as well.