ui-canvas icon indicating copy to clipboard operation
ui-canvas copied to clipboard

Cant import `zeroLength`

Open ghost opened this issue 2 years ago • 4 comments

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;

ghost avatar Dec 19 '22 18:12 ghost

@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?

farfromrefug avatar Dec 21 '22 13:12 farfromrefug

@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

ghost avatar Dec 21 '22 17:12 ghost

@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)

farfromrefug avatar Dec 21 '22 20:12 farfromrefug

@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",

Woongsik avatar Dec 22 '22 11:12 Woongsik