-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Unable to support server-side rendering #1638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think the reason is: |
Any current stable version which isn't throwing |
Higher than 1.8.4 version can not work in server-side rendering |
Pin {
"resolutions": {
"sortablejs": "1.8.3"
}
} |
@MarcelloTheArcane yes, I am using vuedraggable also,and I have submitted a issue to the vuedraggable team |
@MarcelloTheArcane I think this problem needs to be solved by the vuedraggable team. |
Are you instantiating Sortable on the server? |
I don't think it gets round to checking: https://github.com/SortableJS/Sortable/blob/1.8.3/Sortable.js#L24 |
@owen-m1 but 1.10.0 is not checking the navigator object when you import it: |
Ok. I will fix soon. |
@Xzillion Do you know if this issue would occur if I used I am trying to figure out what I should do here because it seems that the only reason it would have worked before in 1.9.0 is because Sortable would have thrown an error when the window object is not defined. |
This was solved in 1.10.1 |
Problem:
Unable to support server-side rendering
Version
1.10.0
Environment
chrome 76, nodejs v8.11.3
Reproduction link
https://codesandbox.io/embed/example-hello-world-802gp
Steps to reproduce
import sortablejs in server side rendering project
What is expected?
show server side rendering page
What is actually happening?
ReferenceError:
navigator is not defined
The text was updated successfully, but these errors were encountered: