so I want to use the code in GitHub to help with my project, I don't sell the code or others I only need the output for my project. in the readme file, the project is built upon A, and B (other GitHub projects). I look in the MIT license of the GitHub project. and what it says is that this project (the one I want to use) is free to use the same with project A also free to use, but project B has Attribution-NonCommercial 4.0 International. so can I use it because the current project allows me or...
You have found code on GitHub which you wish to run, and use the output as part of a commercial endeavour. The code is under a mixture of licences, including MIT and CC BY-NC-4.0. You want to know if you have a licensing issue.
FAOD, you cannot use this code as part of your commercial project. It seems very likely to me that the GitHub codebase is, in copyright terms, a s1a adaptation of the BY-NC-4.0 code, and s2a1b forbids the use of such when "primarily intended for or directed towards commercial advantage or monetary compensation" (s1i).
However, you can likely use the output of this program as part of your project. It is generally understood that the licence under which you received a piece of code does not extend to covering its output; the output is instead generally a derivative work of, and thus covered by any licence on, the inputs. So provided the inputs were all your own work, then unless this program does something like copying part of its own code to its output stream, you can use the output as part of your commercial endeavour.
That said, IANAL/IANYL, so you should seek professional legal advice before you bet a company on the issue.