nativescript-community / nativescript-community/ui-mapbox

throwing error in NS Preview: A module has not been accepted. Failed to apply

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
38
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Hi there, I am trying to use this plugin for my Svelte Native project but it always fails to get import for usage. 'ns preview' just shows message "A module has not been accepted., Failed to apply."
My code:

app.ts

import { svelteNativeNoFrame } from 'svelte-native';
import { registerNativeViewElement } from 'svelte-native/dom';
registerNativeViewElement("mapBox", () => require("@nativescript-community/ui-mapbox").MapboxView);

import App from './App.svelte';
svelteNativeNoFrame(App, {});

Home.svelte

<page>
    <actionBar title="Home" />
    <gridLayout>
        <mapBox
            accessToken="my_token"
            mapStyle="traffic_night"
            latitude="52.3702160"
            longitude="4.8951680"
            zoomLevel="3"
            showUserLocation="true" />
    </gridLayout>
</page>

Does anybody have any suggestion how to resolve this? Thanks.

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.

Research direction

Reproduce the failure with the app.ts and Home.svelte examples by running ns preview in a Svelte Native project. Start by tracing the module-acceptance error and the registerNativeViewElement call for @nativescript-community/ui-mapbox; done means the map view imports and preview completes without the reported failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.