Skip to content

SSR localStorage is not defined when using query.find() #108

Closed
@Vujovic

Description

@Vujovic
export const getServerSideProps: GetServerSideProps = async ({ params }) => {
  const query = new Parse.Query('Job')
  query.find(params.id)

  return {
    props: {
      parseQuery: await encodeParseQuery(query),
    },
  }
}
Server Error
ReferenceError: localStorage is not defined

This error happened while generating the page. Any console logs will be displayed in the terminal window.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions