-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
ReferenceError: Cannot access 'CanvasBase' before initialization #39
Comments
Ok sorry I found where the problem came from I may have opened the issue a little too quickly though it is not in my habits, here is the solution: This code causes the error :
This code resolve the error :
So basically you just have to create an instance of Paint before doing anything if I understand correctly. Is this a normal behavior? |
@Julien-R44 dont be sorry you found an issue. It means i have a circular import dependency somewhere in the lib. |
Thanks for this great lib. I was able to use it for an hour, everything worked perfectly. Then I tried a rebuild after an
ns clean
, and it doesn't work anymore and I don't really understand why since I doesn't changed anything since my last builds.Here is the error I get when I launch my application on the android emulator:
ReferenceError: Cannot access 'CanvasBase' before initialization
Here the import line that cause the error :
If I remove the
createRectF
, the error disappears and the application runs. I tried to replacecreateRectF
bycreateRect
but the error still occurs.Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
@nativescript-community/ui-canvas": "^4.2.13"
@nativescript/core": "~8.0.8"
"nativescript-vue": "^2.9.0",
If you have no idea where it can come from I will try tomorrow to create a repo with where the error is reproducible but I'm not even sure I can do it because the error appeared when I did not change anything in the code.
It seems to be more of a configuration/build problem on my side. I tried to reclone my project, and rebuild it from scratch but it's still the same. However, I'm a bit stuck because I have no way to make this error disappear.
The text was updated successfully, but these errors were encountered: