#Trying to use Leaderline with Nuxt App

5 messages · Page 1 of 1 (latest)

main dew
#
https://www.npmjs.com/package/leader-line-vue - downloaded this package using npm and tried to import it

Component.vue

import LeaderLine from 'leader-line-vue';

I am getting below error

Cannot read properties of undefined (reading 'documentElement')

I am trying to figure out how to fix this.

analog thunder
#

@main dew try a .client.vue component. the package needs browser APIs apparently and can't be rendered on the server

main dew
#

so this plugin gives the Leaderline as a variable LeaderLine.setLine - to create line

#

LeaderLine.obj to access rest of the features