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

Open Kitta-C opened 4 years ago

Kitta-C commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.48.0 x64 Electron: 5.0.13 OS: Unknown Windows version 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

     -8:28.7.0 core:backspace (input.hidden-input)
  2x -8:26.8.0 core:move-right (input.hidden-input)
  2x -8:25.4.0 core:backspace (input.hidden-input)
  2x -8:23.3.0 core:move-left (input.hidden-input)
  3x -8:14.4.0 core:move-up (input.hidden-input)
  9x -8:13.3.0 core:move-left (input.hidden-input)
  5x -8:07.5.0 core:move-right (input.hidden-input)
  2x -8:06.1.0 core:backspace (input.hidden-input)
     -8:03.5.0 core:move-right (input.hidden-input)
  3x -8:03.1.0 core:move-down (input.hidden-input)
 10x -8:01.4.0 core:move-right (input.hidden-input)
     -7:59.7.0 core:backspace (input.hidden-input)
  5x -7:58.1.0 core:move-left (input.hidden-input)
     -7:56 gpp-compiler:compile (input.hidden-input)
  4x -6:33.7.0 core:backspace (input.hidden-input)
     -0:18.3.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

activate-power-mode 2.7.0 
autocomplete-clang 0.13.1 
busy-signal 2.0.1 
gpp-compiler 3.0.7 
ide-c-cpp 0.1.0 
intentions 1.1.5 
linter 2.3.1 
linter-gcc 0.9.0 
linter-ui-default 1.8.1 
UltimateZCoder commented 4 years ago

how do i fix this?

terminal-guy commented 4 years ago

how do i fix this?

ADD THIS TO YOUR PATH THIS WILL FIX IT HAPPY CODING :)

souhibsaleh132 commented 4 years ago

how do i fix this?

ADD THIS TO YOUR PATH THIS WILL FIX IT HAPPY CODING :)

which one should i add ??

terminal-guy commented 4 years ago

how do i fix this?

ADD THIS TO YOUR PATH THIS WILL FIX IT HAPPY CODING :)

which one should i add ??

the .atom folder in your appdata folder.

terminal-guy commented 4 years ago

how do i fix this?

ADD THIS TO YOUR PATH THIS WILL FIX IT HAPPY CODING :)

which one should i add ??

this can be also a syntax error?

terminal-guy commented 4 years ago

how do i fix this?

ADD THIS TO YOUR PATH THIS WILL FIX IT HAPPY CODING :)

which one should i add ??

this can be also a syntax error?

or which folder are you saving

UltimateZCoder commented 4 years ago

I added .atom to my path variable and im still getting the same error

itslavanya commented 4 years ago

Even I am facing the same problem please help with the steps

itslavanya commented 4 years ago

i got the solution just press "CTRL + F6" for compiling instead of just F6

terminal-guy commented 4 years ago

``

I added .atom to my path variable and im still getting the same error

hey paste your code i will fix your problem there must be a syntax error or a link error paste your code and i will reply to you within 24 hrs...:)

terminal-guy commented 4 years ago

I added .atom to my path variable and im still getting the same error

you should save your file without spaces like this:

how_do_linkers_work.cpp

not like this:

how do linkers work.ccp

spaces are not allowed in saving the files in text editor instead of spaces use this

" _ " or "- " to separte the letters......

HAPPY CODING :)

terminal-guy commented 4 years ago

I have posted the varies solution for this issue in the gpp compilers issue page go to that web page and see your issue and solve the problem https://github.com/kriscross07/atom-gpp-compiler/issues/333

On Thu, Jun 25, 2020 at 4:43 PM Lavanya Pushpakar notifications@github.com wrote:

i got the solution just press "CTRL + F6" for compiling instead of just F6

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriscross07/atom-gpp-compiler/issues/333#issuecomment-649474823, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN7BSCUNTLZAU6JSDWEWQ4TRYMWOBANCNFSM4ODIG7XQ .

ghost commented 4 years ago

This is the error I'm getting I appreciate any assistance

[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: 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

     -3:17.1.0 gpp-compiler:compile (input.hidden-input)
     -2:18.8.0 command-palette:toggle (input.hidden-input)
     -2:08.5.0 core:confirm (input.hidden-input)
     -2:08.5.0 settings-view:install-packages-and-themes (input.hidden-input)
     -0:45.6.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

gpp-compiler 3.0.7 
terminal-guy commented 4 years ago

This is the error I'm getting I appreciate any assistance

[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: 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

     -3:17.1.0 gpp-compiler:compile (input.hidden-input)
     -2:18.8.0 command-palette:toggle (input.hidden-input)
     -2:08.5.0 core:confirm (input.hidden-input)
     -2:08.5.0 settings-view:install-packages-and-themes (input.hidden-input)
     -0:45.6.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

gpp-compiler 3.0.7 

please post your code with it so we can help you there may be some kind of error like like linking error or compiler error

terminal-guy commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.48.0 x64 Electron: 5.0.13 OS: Unknown Windows version 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

     -8:28.7.0 core:backspace (input.hidden-input)
  2x -8:26.8.0 core:move-right (input.hidden-input)
  2x -8:25.4.0 core:backspace (input.hidden-input)
  2x -8:23.3.0 core:move-left (input.hidden-input)
  3x -8:14.4.0 core:move-up (input.hidden-input)
  9x -8:13.3.0 core:move-left (input.hidden-input)
  5x -8:07.5.0 core:move-right (input.hidden-input)
  2x -8:06.1.0 core:backspace (input.hidden-input)
     -8:03.5.0 core:move-right (input.hidden-input)
  3x -8:03.1.0 core:move-down (input.hidden-input)
 10x -8:01.4.0 core:move-right (input.hidden-input)
     -7:59.7.0 core:backspace (input.hidden-input)
  5x -7:58.1.0 core:move-left (input.hidden-input)
     -7:56 gpp-compiler:compile (input.hidden-input)
  4x -6:33.7.0 core:backspace (input.hidden-input)
     -0:18.3.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

activate-power-mode 2.7.0 
autocomplete-clang 0.13.1 
busy-signal 2.0.1 
gpp-compiler 3.0.7 
ide-c-cpp 0.1.0 
intentions 1.1.5 
linter 2.3.1 
linter-gcc 0.9.0 
linter-ui-default 1.8.1 

please post your code with it so we can help you there may be some kind of error like like linking error or compiler error :)

ghost commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.48.0 x64 Electron: 5.0.13 OS: Unknown Windows version 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

     -8:28.7.0 core:backspace (input.hidden-input)
  2x -8:26.8.0 core:move-right (input.hidden-input)
  2x -8:25.4.0 core:backspace (input.hidden-input)
  2x -8:23.3.0 core:move-left (input.hidden-input)
  3x -8:14.4.0 core:move-up (input.hidden-input)
  9x -8:13.3.0 core:move-left (input.hidden-input)
  5x -8:07.5.0 core:move-right (input.hidden-input)
  2x -8:06.1.0 core:backspace (input.hidden-input)
     -8:03.5.0 core:move-right (input.hidden-input)
  3x -8:03.1.0 core:move-down (input.hidden-input)
 10x -8:01.4.0 core:move-right (input.hidden-input)
     -7:59.7.0 core:backspace (input.hidden-input)
  5x -7:58.1.0 core:move-left (input.hidden-input)
     -7:56 gpp-compiler:compile (input.hidden-input)
  4x -6:33.7.0 core:backspace (input.hidden-input)
     -0:18.3.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

activate-power-mode 2.7.0 
autocomplete-clang 0.13.1 
busy-signal 2.0.1 
gpp-compiler 3.0.7 
ide-c-cpp 0.1.0 
intentions 1.1.5 
linter 2.3.1 
linter-gcc 0.9.0 
linter-ui-default 1.8.1 

please post your code with it so we can help you there may be some kind of error like like linking error or compiler error :)

The thing is I'm trying it with the "Hello world" print command. I'm just trying to set it up on the machine, but it doesn't seem to like it.

terminal-guy commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.48.0 x64 Electron: 5.0.13 OS: Unknown Windows version 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

     -8:28.7.0 core:backspace (input.hidden-input)
  2x -8:26.8.0 core:move-right (input.hidden-input)
  2x -8:25.4.0 core:backspace (input.hidden-input)
  2x -8:23.3.0 core:move-left (input.hidden-input)
  3x -8:14.4.0 core:move-up (input.hidden-input)
  9x -8:13.3.0 core:move-left (input.hidden-input)
  5x -8:07.5.0 core:move-right (input.hidden-input)
  2x -8:06.1.0 core:backspace (input.hidden-input)
     -8:03.5.0 core:move-right (input.hidden-input)
  3x -8:03.1.0 core:move-down (input.hidden-input)
 10x -8:01.4.0 core:move-right (input.hidden-input)
     -7:59.7.0 core:backspace (input.hidden-input)
  5x -7:58.1.0 core:move-left (input.hidden-input)
     -7:56 gpp-compiler:compile (input.hidden-input)
  4x -6:33.7.0 core:backspace (input.hidden-input)
     -0:18.3.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

activate-power-mode 2.7.0 
autocomplete-clang 0.13.1 
busy-signal 2.0.1 
gpp-compiler 3.0.7 
ide-c-cpp 0.1.0 
intentions 1.1.5 
linter 2.3.1 
linter-gcc 0.9.0 
linter-ui-default 1.8.1 

please post your code with it so we can help you there may be some kind of error like like linking error or compiler error :)

The thing is I'm trying it with the "Hello world" print command. I'm just trying to set it up on the machine, but it doesn't seem to like it.

hello do you understand

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.48.0 x64 Electron: 5.0.13 OS: Unknown Windows version 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

     -8:28.7.0 core:backspace (input.hidden-input)
  2x -8:26.8.0 core:move-right (input.hidden-input)
  2x -8:25.4.0 core:backspace (input.hidden-input)
  2x -8:23.3.0 core:move-left (input.hidden-input)
  3x -8:14.4.0 core:move-up (input.hidden-input)
  9x -8:13.3.0 core:move-left (input.hidden-input)
  5x -8:07.5.0 core:move-right (input.hidden-input)
  2x -8:06.1.0 core:backspace (input.hidden-input)
     -8:03.5.0 core:move-right (input.hidden-input)
  3x -8:03.1.0 core:move-down (input.hidden-input)
 10x -8:01.4.0 core:move-right (input.hidden-input)
     -7:59.7.0 core:backspace (input.hidden-input)
  5x -7:58.1.0 core:move-left (input.hidden-input)
     -7:56 gpp-compiler:compile (input.hidden-input)
  4x -6:33.7.0 core:backspace (input.hidden-input)
     -0:18.3.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

activate-power-mode 2.7.0 
autocomplete-clang 0.13.1 
busy-signal 2.0.1 
gpp-compiler 3.0.7 
ide-c-cpp 0.1.0 
intentions 1.1.5 
linter 2.3.1 
linter-gcc 0.9.0 
linter-ui-default 1.8.1 

please post your code with it so we can help you there may be some kind of error like like linking error or compiler error :)

The thing is I'm trying it with the "Hello world" print command. I'm just trying to set it up on the machine, but it doesn't seem to like it.

i have posted many solution to your problems in this page please go and check that out

terminal-guy commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.48.0 x64 Electron: 5.0.13 OS: Unknown Windows version 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

     -8:28.7.0 core:backspace (input.hidden-input)
  2x -8:26.8.0 core:move-right (input.hidden-input)
  2x -8:25.4.0 core:backspace (input.hidden-input)
  2x -8:23.3.0 core:move-left (input.hidden-input)
  3x -8:14.4.0 core:move-up (input.hidden-input)
  9x -8:13.3.0 core:move-left (input.hidden-input)
  5x -8:07.5.0 core:move-right (input.hidden-input)
  2x -8:06.1.0 core:backspace (input.hidden-input)
     -8:03.5.0 core:move-right (input.hidden-input)
  3x -8:03.1.0 core:move-down (input.hidden-input)
 10x -8:01.4.0 core:move-right (input.hidden-input)
     -7:59.7.0 core:backspace (input.hidden-input)
  5x -7:58.1.0 core:move-left (input.hidden-input)
     -7:56 gpp-compiler:compile (input.hidden-input)
  4x -6:33.7.0 core:backspace (input.hidden-input)
     -0:18.3.0 gpp-compiler:compile (input.hidden-input)

Non-Core Packages

activate-power-mode 2.7.0 
autocomplete-clang 0.13.1 
busy-signal 2.0.1 
gpp-compiler 3.0.7 
ide-c-cpp 0.1.0 
intentions 1.1.5 
linter 2.3.1 
linter-gcc 0.9.0 
linter-ui-default 1.8.1 

please post your code with it so we can help you there may be some kind of error like like linking error or compiler error :)

The thing is I'm trying it with the "Hello world" print command. I'm just trying to set it up on the machine, but it doesn't seem to like it.

do you install minGW compiler for c++ in your system

if you did not install minGW gpp compiler will not work on your system...

if you want to install it this is the video: https://www.youtube.com/watch?v=zaokK25DITo

terminal-guy commented 4 years ago

If you have any issue in gpp-compiler send me a mail at: vishaladhithya19@gmail.com

                        or 

ask in instragram:

        https://www.instagram.com/vishal__b05/?hl=en
terminal-guy commented 4 years ago

If you have any issue in gpp-compiler send me a mail at: vishaladhithya19@gmail.com

                        or 

ask in instragram:

        https://www.instagram.com/vishal__b05/?hl=en
ghost commented 4 years ago

If you have any issue in gpp-compiler send me a mail at: vishaladhithya19@gmail.com

                        or 

ask in instragram:

        https://www.instagram.com/vishal__b05/?hl=en

Cheers, mate. I didn't figure out exactly where the issue was, but it is working fine after a complete shutdown. Quite sure about my installation steps since I followed the video you shared. Thanks for your kind support and happy coding :)

terminal-guy commented 4 years ago

If you have any issue in gpp-compiler send me a mail at: vishaladhithya19@gmail.com

                        or 

ask in instragram:

        https://www.instagram.com/vishal__b05/?hl=en

Cheers, mate. I didn't figure out exactly where the issue was, but it is working fine after a complete shutdown. Quite sure about my installation steps since I followed the video you shared. Thanks for your kind support and happy coding :)

You are welcome

kezjo commented 4 years ago

how do i fix this?

add using namespace std; in your code. It works for me :)

someshfengde commented 4 years ago

I am getting same error and added the environment variable done restarting running as administrator but nothing is working with atom

someshfengde commented 4 years ago

fs.js:138 Hide Stack Trace 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 ChildProcess. (C:\Users\ramesh.atom\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) here is the error

freechaos commented 4 years ago

how do i fix this?

I had the same issue even with MinGW compiler which is added to my PATH. Just delete gpp-compiler, then go to config and delete everything refers to gpp-compiler and then install it again. It worked for me. Maybe I had such problem because of conflicting python runner and cpp runner which had same shortcuts.

renanlarrieu commented 4 years ago

Help! I'm getting error.

RhuthuHegde commented 4 years ago

If you have any issue in gpp-compiler send me a mail at: vishaladhithya19@gmail.com

                        or 

ask in instragram:

        https://www.instagram.com/vishal__b05/?hl=en

Cheers, mate. I didn't figure out exactly where the issue was, but it is working fine after a complete shutdown. Quite sure about my installation steps since I followed the video you shared. Thanks for your kind support and happy coding :)

RhuthuHegde commented 4 years ago

Dude even I am facing a similar problem! Did you add the atom path in the environment variables? is it mandatory for it to work??

renanlarrieu commented 4 years ago

Hi bro, I have no solutions to gpp compiler so far. However, I downloaded the package called Hydrogen and it's working well, you should try it.

Regards,

Att, Renan Larrieu de Abreu Mourão

Graduação em Engenharia Elétrica - UERJ - 5° período

On Sun, 16 Aug 2020, 09:22 RhuthuHegde, notifications@github.com wrote:

Dude even I am facing a similar problem! Did you add the atom path in the environment variables? is it mandatory for it to work??

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriscross07/atom-gpp-compiler/issues/333#issuecomment-674519988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKW22CRSMQMGHOFEOSOOAQDSA7FQDANCNFSM4ODIG7XQ .