PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

Anything from tns-core-modules couldn't found #232

Closed Angusoft-India closed 4 years ago

Angusoft-India commented 4 years ago

Hi, I am using Nativescript Angular 6.0.2 and using the NativeScript-Drop-Down. When I try to build the project with nativescript-drop-down for Android or IOS the modules in the drop-down.d.ts throwing error import { ObservableArray } from "data/observable-array"; import { CoercibleProperty, EventData, Property, View } from "ui/core/view"; import { GestureTypes } from "ui/gestures/gestures"; import { ItemsSource } from "ui/list-picker"; import { TextAlignment } from "ui/text-base";

When I manually fix them with the reference to tns-core-modules it's working good

import { ObservableArray } from "tns-core-modules/data/observable-array"; import { CoercibleProperty, EventData, Property, View } from "tns-core-modules/ui/core/view"; import { GestureTypes } from "tns-core-modules/ui/gestures/gestures"; import { ItemsSource } from "tns-core-modules/ui/list-picker"; import { TextAlignment } from "tns-core-modules/ui/text-base";

Let me know if I am doing anything wrong.

Could you help me with the permanent fix for the same.

Thanks

PeterStaev commented 4 years ago

Hey @IyyappanAmirthalingam , this is the duplicate of #198 . You check the discussion there.

FlavioShift3 commented 3 years ago

@IyyappanAmirthalingam I had the same issue: Here my solution. In my case TSConfig.json was like this and get error:

"baseUrl": "./src", "paths": { "": [ "./node_modules/tns-core-modules/", "./node_modules/*" ], I added one more dot before /node_modules and all back to work:

"baseUrl": "./src", "paths": { "": [ "../node_modules/tns-core-modules/", "../node_modules/*" ],