Skip to main content

Hi Guys,

 

I created a tableau extension, in which I want to render a map component using pinia. Coding done using Vue + TS + JS.

 

This is how I try to load the app with map in the main.js file.

----------

main.js

----------

import { createApp } from 'vue';

import { createPinia } from 'pinia';

import App from './App.vue';

import "./styles/general.scss";

import directives from "./directives";

const app = createApp(App);

directives(app);

const pinia = createPinia();

app.use(pinia);

app.mount('#app');

 

--------------

I'm getting this error.

--------------

getActivePinia was called with no active Pinia. Did you forget to install pinia?

const pinia = createPinia()

app.use(pinia)

This will fail in production.

---------------

 

When the map-store as a ts file, it works. I tried it that way in a powerbi custom visual. There it didn't gave this error.

But when the same code used in a Tableau Extension, it needed to compile all the ts files into js files.

Then it doesn't work and gave this error.

Anybody knows how to solve the error, when the map-store used as a js file?

Please let me know, any thing more require to render the pinia map inside a tableau extension.

 

Thanks in advance,

Lasantha

4 respostas
  1. 23 de mar. de 2023, 10:01

    Hi astha kumari,

     

    pinia and other dependencies have been installed correctly.

    My doubt is, still I tested this only with "Tableau Cloud 14 days free trial" sandbox environment.

    In the page where we can add Tableau Extensions to safe-list, it is said that, sandbox environment is not allowed to access external resources.

    May be pinia baseMap url is an external resources url, and so it might be blocked by the sandbox environment.

     

    I suspect so.

    Can you confirm that, it is the reason?

     

    Thanks,

    Lasantha

0/9000