---
title: "Discussion on \"Nextjs : (window is not defined) react-apexcharts\" | Hashnode"
description: "Discussion on \"Nextjs : (window is not defined) react-apexcharts\". Apex Charts tries to access the window object without checking it is available first, so it does not work in server contexts.The workaround is to ensure the library is only used in a browser context.\nIn NextJS, the usual method of ensuring a module o..."
url: "https://hashnode.com/posts/nextjs-window-is-not-defined-react-apexcharts/65409ea942a9bc9a692b4fad"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Nextjs : (window is not defined) react-apexcharts](https://blog.nirdeshpokhrel.com.np/nextjs-window-is-not-defined-react-apexcharts?utm_source=hashnode&utm_medium=feed)

Apex Charts tries to access the window object without checking it is available first, so it does not work in server contexts.The workaround is to ensure the library is only used in a browser context. In NextJS, the usual method of ensuring a module o...

Oct 31, 2023 · 1 min read · blog.nirdeshpokhrel.com.np  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#nepal](https://hashnode.com/tag/nepal)
-   [#apex-charts](https://hashnode.com/tag/apex-charts)

## Written by

[Nirdesh pokharel](https://hashnode.com/@realNirdesh)

@realNirdesh · Nepal

  
[View profile](https://hashnode.com/@realNirdesh)

I'm a Noob. 😊

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
