Window is not defined??? in nuxt.js How to solve it?

clipboard.png
nuxtapi

clipboard.png

Jun.14,2022

nuxtjs as a server rendering library, the code should be executed in the node environment. The execution environment of the browser is different from that of node. There are no objects such as window or document on node, so an error will be reported.

there are two ways to solve it:

if there is no such object or method, you can populate it with an empty object or method:

  https://juejin.im/post/5cee27...

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36878-2c006.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36878-2c006.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?