I am losing it trying to add a companion to my first watch face. I've added an index.ts file to /companion/ but for some reason I cannot seem to import modules at build. What am I doing wrong?
companion/index.ts
import * as messaging from "messaging";
import { geolocation } from "geolocation";app/index.js
import document from "document";
import * as messaging from "messaging";
import { geolocation } from "geolocation";
import { HeartRateSensor } from "heart-rate";
import { BodyPresenceSensor } from "body-presence";
import { today } from "user-activity";
import { battery } from "power";
import { preferences } from "user-settings";
import clock from "clock";
import * as util from "../common/utils";Been battling this for a few hours and no searches show anyone previously having this issue. Any ideas?
Answered! Go to the Best Answer.
Best AnswerWelp. Always seems like typing out my issue somewhere helps unlock new things to check.
I realized that I was mixing javascript and typescript between the app and companion. Once I changed the companion index.ts to index.js the project built just fine.
Going to leave this as a solution since it could help others.
Best AnswerWelp. Always seems like typing out my issue somewhere helps unlock new things to check.
I realized that I was mixing javascript and typescript between the app and companion. Once I changed the companion index.ts to index.js the project built just fine.
Going to leave this as a solution since it could help others.
Best Answer