nativescript-community / ui-canvas

Implement Canvas into your NativeScript apps.
https://nativescript-community.github.io/ui-canvas/
Apache License 2.0
31 stars 9 forks source link

Cant import `zeroLength` #43

Open ghost opened 1 year ago

ghost commented 1 year ago
WARNING in ./node_modules/@nativescript-community/ui-svg/index.common.js 41:20-30
export 'zeroLength' (imported as 'zeroLength') was not found in '@nativescript/core'

Fix:

import { CoreTypes } from '../../core-types';

// ...

this.left = CoreTypes.zeroLength;
this.top = CoreTypes.zeroLength;
farfromrefug commented 1 year ago

@striderwhitepderas this is not a fix. CoreTypes are only types not values. Your issue seems to be your @nativescript/core version. Which version are you using?

ghost commented 1 year ago

@farfromrefug The only reason why I suggested this as a fix was because this is how other components are using zeroLength - by importing it from CoreTypes. If you're saying it's not a fix then I believe you, I do not know enough of this framework.

My Nativescript version is 8.3.3

farfromrefug commented 1 year ago

@striderwhitepderas that s weird for other components to do it that way. Do you have an example? Can you try upgrading to nativescript 8.4.x to see it if starts to work? (even if it works i will try to make it work with 8.3.x)

Woongsik commented 1 year ago

@farfromrefug Hi, I have the same issue with NS 8.4.x but I can still run the application. I am using CoreTypes for geolcation accuracy

"@nativescript/core": "~8.4.1", "@nativescript/android": "~8.4.0", "@nativescript/ios": "~8.4.0", "@nativescript/types": "~8.4.0",