EddyVerbruggen / nativescript-taptic-engine

:vibration_mode: Use Apple's Taptic Engine to vibrate your iPhone 6s (and up) in a variety of ways
MIT License
18 stars 2 forks source link

Cant find module #3

Closed davecoffin closed 7 years ago

davecoffin commented 7 years ago

Im at a loss...my compiled app cant find the folder. Intellisense works, everything works fine except when I run my app I get:

file:///app/views/home/home.js:6:43: JS ERROR Error: Could not find module 'nativescript-taptic-engine'. Computed path '/var/mobile/Containers/Data/Application/B65BB3AF-ED2B-44AF-BF5D-9DF5586D84FC/Library/Application Support/LiveSync/app/tns_modules/nativescript-taptic-engine'.

Its listed as a plugin when I run tns plugin, when I import it I get intellisense on it:

import { TapticEngine } from "nativescript-taptic-engine";
let tap = new TapticEngine();

but calling new TapticEngine() triggers that error. This is happening on two different projects, one angular one not, and I've tried removing my platforms entirely and re-adding. Any ideas?

EddyVerbruggen commented 7 years ago

I didn't visit this one for a while. I'll try to make time soon.

davecoffin commented 7 years ago

Hey Eddy, this is weird, I went to inspect the native api calls to do it manually in my app and I discovered that for some reason when the plugin is installed, all you get is the .d files:

screen shot 2017-06-07 at 9 58 16 am

That would explain why intellisense works fine, but the module isnt found.

EddyVerbruggen commented 7 years ago

Ugh, that's nog good 😢 - let me try to fix that this evening!

EddyVerbruggen commented 7 years ago

All fine now - version 2.0.3 published. Thanks for letting me know!

I also took the opportunity to upgrade the dependencies and demo to {N} 3.0.0, but that didn't change the generated JS files.