Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Callback must be a function. Received undefined #358

Open
aman-7299 opened this issue Nov 4, 2020 · 13 comments
Open

Comments

@aman-7299
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.52.0 x64
Electron: 6.1.12
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:142

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

Commands

     -8:52.6.0 tree-view:remove (span.name.icon.icon-file-text)
     -7:51.4.0 core:backspace (input.hidden-input)
  3x -7:43.1.0 editor:newline (input.hidden-input)
  3x -7:24.8.0 core:backspace (input.hidden-input)
  3x -7:17.6.0 editor:newline (input.hidden-input)
  4x -6:33.4.0 core:backspace (input.hidden-input)
     -5:15.3.0 editor:newline (input.hidden-input)
     -5:09.2.0 core:backspace (input.hidden-input)
     -4:47.2.0 core:save (input.hidden-input)
  2x -4:36.8.0 gpp-compiler:compile (input.hidden-input)
     -3:10.6.0 tree-view:remove (span.name.icon.icon-file-text)
     -3:04.7.0 gpp-compiler:compile (div.line)
     -0:34.1.0 core:paste (input.hidden-input)
     -0:27.2.0 core:save (input.hidden-input)
     -0:17.4.0 gpp-compiler:compile (div.line)

Non-Core Packages

gpp-compiler 3.0.7 
@theyoungwriter-tk
Copy link

Yes, I get the same error too.

@Andreto
Copy link

Andreto commented Nov 7, 2020

+1 (Solved)
Make sure that you have a return statement in your main loop. This resolved the issue for me.

@ghost
Copy link

ghost commented Nov 10, 2020

i too got this error ,how can i solve this?

@TinkerWizard
Copy link

Yeah, @Andreto i cant solve this error.... How to kick this.?. i tried your way ,doesnt work

@Andreto
Copy link

Andreto commented Nov 10, 2020

Maybe try installing MinGW with the MinGW setup tool following this tutorial. https://www.youtube.com/watch?v=xwRoQ5GkwJI

@TinkerWizard
Copy link

@Andreto ummm,..yeah...but i have to tell,i just installed mingw!!!!........ Is this issue is for everyone?

@Andreto
Copy link

Andreto commented Nov 10, 2020

@starksiv I don't know if I can help you then. Maybe check these #285, #319. They claim that they have solved the issue.

@TinkerWizard
Copy link

@Andreto thank you so much!!!! ☻

@Ilbekko
Copy link

Ilbekko commented Nov 30, 2020

how do how do i get xcode to work with atom if I'm on a Mac?

@RichardMorris
Copy link

I think this error is caused by issue 284 #284. Changing fs.writeFile(...) to fs.writeFileSync(...) on line 299 and changing fs.unlink(...) to fs.unlinkSync(...) on line 427 of index.js, both successfully writes the compiling_error.txt file and makes this other error go away.

@srai86825
Copy link

helppppp;;;; how to fix this

@Mystogan-0
Copy link

Same error, I tried reinstalling MinGW but it didn't help. Does anyone know how to solve this??

@RichardMorris
Copy link

Same error, I tried reinstalling MinGW but it didn't help. Does anyone know how to solve this??

Do you have a stack trace, (see Developer console)

If top of the stack trace is

TypeError [ERR_INVALID_CALLBACK] [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
at maybeCallback (fs.js:142:9)
at Object.writeFile (fs.js:1175:14)

then see my fix a couple of comments above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants