react-spreadsheet icon indicating copy to clipboard operation
react-spreadsheet copied to clipboard

NextJS 13 Uncaught TypeError: Cannot read properties of undefined (reading 'random')

Open armandleopold opened this issue 11 months ago • 0 comments

The problem :

From the Exemple : https://iddan.github.io/react-spreadsheet/docs/usage When i am in dev mode it works fine :

image

But when i build my NextjsApp :

I get a crash client side , console prints :

3145-2cf2e0b67fbcb774.js:4 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'random')
    at 3145-2cf2e0b67fbcb774.js:4:28901
    at 28174 (3145-2cf2e0b67fbcb774.js:4:34227)
    at l (webpack-a2422d10cbdabda8.js:1:167)
    at 7017 (3145-2cf2e0b67fbcb774.js:1:170184)
    at l (webpack-a2422d10cbdabda8.js:1:167)
    at 87124 (3145-2cf2e0b67fbcb774.js:2:17590)
    at l (webpack-a2422d10cbdabda8.js:1:167)
    at 80402 (3145-2cf2e0b67fbcb774.js:4:117)
    at l (webpack-a2422d10cbdabda8.js:1:167)
    at 91314 (3145-2cf2e0b67fbcb774.js:4:74361)

I searched everithing, it seems to come from the fast formula parser

This package doesn't seems to handle correctly Server Side Rendering.

Any ideas ? other people has the problem ?

Reproduce :

  1. Create a NextJS App
  2. Install react-spreadsheet
  3. Test in dev : ok
  4. Build in production
  5. Test in production : ko

There is not conditions on the data because i used the exemple data.

armandleopold avatar Mar 06 '24 18:03 armandleopold