Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ImportJs not working on mobile device

Open
#47 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Domain
mobile-dev

Research direction

Start with the engine.importJs("Ext/Scripts/MediaList.js") call and the failing dynamic-import URL shown in the report. Compare how this path is resolved on desktop versus an Obsidian mobile device, then verify that the same script can be imported from the phone's Documents location without the capacitor_file mismatch.

Written by the indexing model from the issue text.

Description

TypeError: failed to fetch dynamically imported module: http://localhost/_capacitor_file_/storage/emulated/0/Documents/Obsidian/vault1/Ext/Scripts/MediaList.js

const ml = await engine.importJs("Ext/Scripts/MediaList.js");

It seems to me like it is trying to fetch in the capacitor files while the actual location of the file is in the main Documents folder of my phone.

I hope it is clear that this same code works on Desktop

Would be good to know if there is a solution to this?

Dominant language
TypeScript
Stars
191
Forks
15
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mProjectsCode/obsidian-js-engine-plugin

All issues in mProjectsCode/obsidian-js-engine-plugin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.