coston / react-super-responsive-table

Turn the tables on unresponsive data!
https://react-super-responsive-table.coston.io
MIT License
434 stars 50 forks source link

Error: Global is Not define [Solution] #636

Closed pantharshit007 closed 3 months ago

pantharshit007 commented 5 months ago

Describe the bug I got an error like the one mention in the screenshot below in the react VITE project. I did exactly the same steps that are mentioned in the official npm site.

here global is deprecated and we need to use globalThis instead

Screenshots image image

SOLUTION IS IN THE BELOW COMMENT UNLIKE ISSUE #552

pantharshit007 commented 5 months ago

JUST ADD THIS LINE IN YOUR vite.config.js file

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  define: {
    global: "globalThis",
  }
})

this is the important part

define: {
    global: "globalThis",
  }

SOURCE: here https://github.com/react-simple-code-editor/react-simple-code-editor/issues/86

coston commented 3 months ago

This issue is resolved