Has no exported member 'AuthProvider' - ionic2

enter image description here
I have a project in school and I'm having a hard time in fixing it.
Code:
import { AuthProvider } from '../providers/auth/auth';
under the word AuthProvider has a red underline that says:
[ts] Module '"c:/Users/Mikko/Ionic_Projects/myProject/FinalProject/src/providers/auth/auth"' has no exported member 'AuthProvider'.
I am not familiar with ionic2 so that's why I have no idea on how to fix this.

Add 'export' keyword before "Class AuthProvider" in /providers/auth/auth.ts

Related

PyCharm unittest error: Provide a qualified name of function, class or a module

How to get rid of this annoying error? I do not understand what it want me to do.
This happens when I am trying to run a test
Clicking on "Run" follows up with the following
Screen
Clicking on "Continue Anyway" runs the tests normally.
So what should I do in order to stop this window from popping up every time I ran the tests?
Updated:
Here is what I've found myself meanwhile:
From here
if (targetType == PyRunTargetVariant.PYTHON && !isWellFormed()) {
throw RuntimeConfigurationError("Provide a qualified name of function, class or a module")
}
And a function isWellFormed() declaration from here
/**
* Sanity check for "target" value. Does not resolve target, only check its syntax
* CUSTOM type is not checked.
*/
fun TargetWithVariant.isWellFormed() = when (targetVariant) {
PyRunTargetVariant.PYTHON -> Regex("^[a-zA-Z0-9._]+[a-zA-Z0-9_]$").matches(target ?: "")
PyRunTargetVariant.PATH -> !VfsUtil.isBadName(target)
else -> true
}
Everything looks good with a regex of my test class and method names.
Ok, this is really weird.
I took a good look at a regex and found that it doesn't want any '-' in the target path. So renaming a filename from ads_wrapper-tests.py to ads_wrapper_tests.py solves the problem and the window is not popping up any more.
With this issue Error: Provide a qualified name of a function, class or module just got fixed, soon Pycharm would allow using all valid identifier names in target name.

Enum error: expected identifier before numeric constant

I added a file in source control which had an enum definition as:
enum { OK = 0, ERROR };
But on compilation it was throwing errors like "expected identifier before numeric constant."
Did my research on that and the culprit was supposed to be 'OK' which was defined somewhere else in the code. So, i changed OK with say, OK_1, and the issue was, indeed, resolved.
However, I have not been able to find where in my code base was this 'OK' defined before.
I ran a grep from top level and couldn't find it. I am pretty sure I have covered all the application related code, but OK wasn't there.
I think it's unlikely that it was a part of some shared library as compilation process didn't even reach linking phase. It could have come from one of the header files maybe.
Is there a way/linux tool that somehow can be tricked to find where this OK is coming from?
If you are using C++ 11 take a look at enum class:
http://www.cprogramming.com/c++11/c++11-nullptr-strongly-typed-enum-class.html
One big draw back of enum is that you cant have 2 enums with the same name.
With enum class this draw back is gone, you can write thing like this:
enum class Color {RED, GREEN, BLUE};
enum class Feelings {EXCITED, MOODY, BLUE};
And later on in the code:
Color color = Color::GREEN;
if ( Color::RED == color )
{
// the color is red
}
Code example is pasted from linked www page
Converting my comment to answer.
Looks like you need pre-processor output Can gcc output C code after preprocessing?
my English is not good,but you can try enum var{xxx,xxx},you can customize var.

Error: Variable "BOOL" is not a type name

I am trying to create a very simple MFC application when suddenly Visual Studio decides it no longer recognizes what a BOOL is.
I cannot figure out why this is happening. Does anyone know why this is going on and how to fix it?
It looks like you're missing a closing semi-colon at the end of your class.
class CApp : public CWinApp {
...
}; <---
This is the proper class syntax. I'm sure you know that and just happened to delete it and missed the simple error. I would say when you look at the error report it's best to solve the topmost one first. Doing so can eliminate other errors in the list especially in the case of a ;. Your image reflects that on the first line where it tells you about a missing ;.

Trouble calling member function in debugger

I'm trying to call a member function of a variable from within the watch window of VS 2010. I keep getting the error, "member function not present". I've searched google and SO and arrived at these attempts:
{,,Dll}var.member()
var.{,,Dll}member()
var.{,,Dll}namespace::class::member()
{,,Dll}member(&var)
{,,Dll}namespace::class::member(&var)
None work. The errors are, respectedly:
"symbol 'var' not found"
"missing operand"
"missing operand"
"symbol 'var' not found"
"symbol 'var' not found"
However, var in the watch window works fine.
The function does exist. I can call it from code. I just can't seem to use it in a watch expression. If I could I think I could answer my somewhat related question: Viewing a pimpl from DLL in debugger
Yes, symbols are loaded. I can watch this:
{,,Dll}namespace::class::member
It results in a type I would expect.
Any ideas?
Edit: oh, and the var is of a type exported from 'Dll.dll' and imported by the current process I'm trying to debug (unit tests).

Error parsing when reversing code

I try to make a class diagram from existing C++ code using Enterprise Architect 9.3.935. I do Code Engineering / Import Source Directory and then select my directory.
However, I get tons of error of type:
"There was an error parsing C:\xxxxx # on line xxxx. Unexpected symbol: XXXXX.
You may need to define a language macro."
In the code, I have a macro for exporting DLL and most of my class look like :
class MACRO_FOR_DLL_EXPORT CMyClassName
{
...
}
or
class MACRO_FOR_DLL_EXPORT CMyClassName : public CHerMother
{
...
}
The unexpected symbol is usually "{" in the first case and "CHerMother" in the second.
How to fix this issue, is it related with the macro ?
You can declare several Language specific macros in your EA project, to ignore these when reverse engineering (parsing) code. There's a number of standard C/C++ framework macros predefined natively by EA.