PeterStaev / NativeScript-Drop-Down

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

NativeScript Drop Down: can not find module #106

Closed AshleyCao closed 7 years ago

AshleyCao commented 7 years ago

Hey, I am using Visual Studio for a NativeScript project. I added nativescript-drop-down npm package into dependencies. But I still got errors like ' Failed to find module : ../app/nativescript-drop-down '.

Here is .xml,

<Page xmlns="http://www.nativescript.org/tns.xsd" xmlns:dd="nativescript-drop-down" shownModally="onShownModally" loaded="onLoaded" unloaded="onUnloaded">

something wrong with the way I use plugin in VS? Thank you

PeterStaev commented 7 years ago

Hey @AshleyCao , seems the runtime is trying to find the module in your app folder instead of the TNS one, which probably means that the plugin is not installed correctly. Have you run npm install after you have added the plugin to the package.json deps?

AshleyCao commented 7 years ago

Hey @PeterStaev, I am using Visual Studio and install your plugin from npm market. I could find dependencies in package.json.

"dependencies": {
    "tns-core-modules": "2.5.1",
    "nativescript-telerik-ui-pro": "2.0.1",
    "nativescript-sqlite": "1.1.7",
    "nativescript-drop-down": "3.0.2"
  },

capture

PeterStaev commented 7 years ago

Hey @AshleyCao , I see your problem now. You are using TNS 2.5. The new versions of the plugin are meant to be used with TNS 3.0. So you will have to either update TNS to 3.0 or you should install 1.5 version of the DropDown plugin.

AshleyCao commented 7 years ago

Hey @PeterStaev, thanks for your suggestion. The error is indeed related to package compatibility.