Posted 12 September 2023, 7:50 pm EST
Hi we have a nextjs project and I install spreadjs designer into it. below is my package.json
{
"name": "rebound",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next",
"build": "next build",
"start": "NODE_OPTIONS=--max_old_space_size=4096 next",
"lint": "next lint",
"export": "next export"
},
"dependencies": {
"@ant-design/icons": "^5.0.1",
"@azure/msal-browser": "^2.33.0",
"@azure/msal-react": "^1.5.3",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@fontsource/roboto": "^4.5.8",
"@grapecity/spread-excelio": "^16.2.2",
"@grapecity/spread-sheets": "^16.2.2",
"@grapecity/spread-sheets-barcode": "^16.2.2",
"@grapecity/spread-sheets-charts": "^16.2.2",
"@grapecity/spread-sheets-designer": "^16.2.2",
"@grapecity/spread-sheets-designer-react": "^16.2.2",
"@grapecity/spread-sheets-designer-resources-en": "^16.2.2",
"@grapecity/spread-sheets-io": "^16.1.0",
"@grapecity/spread-sheets-languagepackages": "^16.2.2",
"@grapecity/spread-sheets-pdf": "^16.2.2",
"@grapecity/spread-sheets-pivot-addon": "^16.2.2",
"@grapecity/spread-sheets-print": "^16.2.2",
"@grapecity/spread-sheets-react": "^16.2.2",
"@grapecity/spread-sheets-resources-ja": "^16.1.0",
"@grapecity/spread-sheets-resources-ko": "^16.1.0",
"@grapecity/spread-sheets-resources-zh": "^16.1.0",
"@grapecity/spread-sheets-shapes": "^16.2.2",
"@grapecity/spread-sheets-slicers": "^16.1.0",
"@grapecity/spread-sheets-tablesheet": "^16.1.0",
"@headlessui/react": "^1.7.11",
"@mui/material": "^5.11.10",
"@next/font": "13.1.6",
"@reduxjs/toolkit": "^1.9.3",
"@zeit/next-less": "^1.0.1",
"antd": "^5.3.1",
"axios": "^1.3.4",
"bootstrap": "^5.2.3",
"d3-3.5.17": "^1.0.0",
"echarts": "^5.4.1",
"echarts-for-react": "^3.0.2",
"eslint": "8.34.0",
"eslint-config-next": "13.1.6",
"group-by-with-sum": "^2.0.0",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.5.28",
"less": "^2.7.3",
"next": "13.1.6",
"primeicons": "^6.0.1",
"primereact": "^9.1.1",
"react": "18.2.0",
"react-bootstrap": "^2.7.2",
"react-circular-progressbar": "^2.1.0",
"react-csv-downloader": "^2.9.0",
"react-dom": "18.2.0",
"react-equal-height": "^1.2.2",
"react-icons": "^4.8.0",
"react-pivottable": "^0.11.0",
"react-redux": "^8.0.5",
"react-router-dom": "^6.8.1",
"react-select": "^5.7.0",
"react-slick": "^0.29.0",
"react-to-print": "^2.14.12",
"react-toastify": "^9.1.1",
"reactjs-localstorage": "^1.0.1",
"slick-carousel": "^1.8.1",
"xlsx": "^0.18.5"
},
"devDependencies": {
"autoprefixer": "^10.4.13",
"postcss": "^8.4.21",
"tailwindcss": "^3.2.7"
}
}
But when I start the project with command npm run dev I am getting below error.
event - compiled client and server successfully in 117.5s (5358 modules)
error - ReferenceError: navigator is not defined
at ./src/calc.common.ts (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3190072)
at r (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3125370)
at ./src/Parser.ts (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3128927)
at r (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3125370)
at ./src/calc.entry.ts (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3191347)
at r (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3125370)
at C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3396904
at ./node_modules_local/@grapecity/js-calc/dist/gc.spread.calcengine.js (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3396971)
at r (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:104)
at ./node_modules_local/@grapecity/js-calc/index.js (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3397082)
at r (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:104)
at ./all.entry.js (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:308)
at r (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:104)
at C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3905923
at Object.<anonymous> (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\dist\gc.spread.sheets.all.min.js:13:3905975)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:121:18)
at Object.<anonymous> (C:\Users\Dattathreya\red-ui\DistributionBusiness\node_modules\@grapecity\spread-sheets\index.js:1:18)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:121:18)
at @grapecity/spread-sheets (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\pages\index.js:1796:18)
at __webpack_require__ (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///./src/components/SpreadsheetView.jsx:11:82)
at ./src/components/SpreadsheetView.jsx (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\pages\index.js:396:1)
at __webpack_require__ (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///./src/components/popups/backlog/bussinessunit/index.js:35:86)
at __webpack_require__.a (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\webpack-runtime.js:97:13)
at eval (webpack-internal:///./src/components/popups/backlog/bussinessunit/index.js:1:21)
at ./src/components/popups/backlog/bussinessunit/index.js (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\pages\index.js:726:1)
at __webpack_require__ (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///./src/components/popups/backlog/index.js:16:72)
at __webpack_require__.a (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\webpack-runtime.js:97:13)
at eval (webpack-internal:///./src/components/popups/backlog/index.js:1:21)
at ./src/components/popups/backlog/index.js (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\pages\index.js:737:1)
at __webpack_require__ (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///./src/components/layout/top.js:22:85)
at __webpack_require__.a (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\webpack-runtime.js:97:13)
at eval (webpack-internal:///./src/components/layout/top.js:1:21)
at ./src/components/layout/top.js (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\pages\index.js:649:1)
at __webpack_require__ (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///./src/components/layout/layout.js:8:62)
at __webpack_require__.a (C:\Users\Dattathreya\red-ui\DistributionBusiness\.next\server\webpack-runtime.js:97:13) {
page: '/'
}
Can you please help me with this issue. I am using node version 18.17.1