question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSR problem in vue.draggable context

See original GitHub issue

Problem:

Hello @owen-m1 , version 1.1.0.0 of sortable.js introduced a call to navigator global property. This is breaking SSR usage of vue.draggable: building the template on the server-side using node (none browser context).

I tried a fix to require sortable.js only in browser context (https://github.com/SortableJS/Vue.Draggable/issues/724), but it seems

I can not think of another fix on vue.draggable side thougth. Could it be possible to check for navigator early in sortable.js to avoid to raise exception when navigator is not defined?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:29 (17 by maintainers)

github_iconTop GitHub Comments

4reactions
owen-m1commented, Oct 1, 2019

@UnaiRA I will release 1.10.1 tonight.

3reactions
owen-m1commented, Oct 1, 2019

@UnaiRA @stuta Please try building commit 576e33540c545dcefe0d805754ac2f454b55538f and tell me if it fixes the problem. I just made it so that Sortable will not throw any errors on import if the window or document is not defined. Obviously it won’t work properly unless it is imported in a browser context, but this has always been the behaviour of Sortable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue Draggable Recursive / Nested Dragging Weird Behavior
Moves the parent and it's parent somewhere else where I drag it, but leaves the child where it was i.e image Initial state...
Read more >
Vue Cal - GitHub Pages
Resize an event by dragging the resizer handle. Not available if no timeline, not possible on background events. Drag & drop an event...
Read more >
[Solved]-vue-js-modal - "draggable" issue-Vue.js
Try from scratch from my code example below Install the library as: npm install --save vue-js-modal. The following works fine (tested):
Read more >
Making Nuxt.js clone with Vue 3 and Vite (Vue Custom ...
At the time of calling the store in asyncData, pass pinia there from the application context, otherwise there will be problems when rendering...
Read more >
QImg
The QImg Vue component makes working with responsive images easy and also adds a nice loading effect to them along with many other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found