When a nuxt project introduces a rich text editor to refresh the page, it will report an error document is not defined.

error occurs when page refresh is introduced, and the whole project cannot be refreshed if introduced globally

clipboard.png

clipboard.png
solution

Mar.14,2021

there is no document in the node environment. You need to load


https://cn.vuejs.org/v2/api/-sharp. asynchronously. You can use Vue.prototype.$isServer to determine whether it is in the server environment


Hello. Have you solved the problem

?
Menu