zsusac/ReactHTMLTableToExcel

npm install failure

adrian19hub opened this issue · 0 comments

command: npm i react-html-table-to-excel --legacy-peer-deps

Error:
npm ERR! code 1
npm ERR! path C:\Users\adrian.y\myWayStudio\node_modules\node-expat
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.13.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.1 found at "C:\Python310\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1831) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Python310\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\adrian.y\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\adrian.y\myWayStudio\node_modules\node-expat\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\adrian.y\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\adrian.y\AppData\Local\node-gyp\Cache\16.13.1\include\node\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\adrian.y\AppData\Local\node-gyp\Cache\16.13.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\adrian.y\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\adrian.y\\AppData\\Local\\node-gyp\\Cache\\16.13.1\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\adrian.y\myWayStudio\node_modules\node-expat',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\Users\adrian.y\myWayStudio\node_modules\node-expat\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'nan'
npm ERR! Require stack:
npm ERR! - C:\Users\adrian.y\myWayStudio\node_modules\node-expat[eval]
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! at require (node:internal/modules/cjs/helpers:102:18)
npm ERR! at [eval]:1:1
npm ERR! at Script.runInThisContext (node:vm:129:12)
npm ERR! at Object.runInThisContext (node:vm:305:38)
npm ERR! at node:internal/process/execution:75:19
npm ERR! at [eval]-wrapper:6:22
npm ERR! at evalScript (node:internal/process/execution:74:60) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! 'C:\Users\adrian.y\myWayStudio\node_modules\node-expat\[eval]'
npm ERR! ]
npm ERR! }
npm ERR! gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\adrian.y\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:261:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\adrian.y\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\adrian.y\myWayStudio\node_modules\node-expat
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\adrian.y\AppData\Local\npm-cache_logs\2022-07-05T07_52_15_620Z-debug-0.log

My package.json:
{
"name": "my-way-studio",
"version": "0.1.0",
"private": true,
"dependencies": {
"@cutting/use-get-parent-size": "^1.19.2",
"@date-io/date-fns": "1.3.13",
"@date-io/moment": "^2.13.1",
"@emotion/react": "^11.9.0",
"@emotion/styled": "^11.8.1",
"@hookform/resolvers": "^2.8.8",
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.58",
"@material-ui/pickers": "^3.3.10",
"@mui/icons-material": "^5.4.1",
"@mui/lab": "^5.0.0-alpha.75",
"@mui/material": "^5.7.0",
"@mui/styled-engine-sc": "^5.1.0",
"@mui/system": "^5.6.2",
"@mui/x-data-grid": "^5.4.0",
"@mui/x-date-pickers": "^5.0.0-alpha.2",
"@progress/kendo-data-query": "^1.5.5",
"@progress/kendo-drawing": "^1.11.0",
"@progress/kendo-licensing": "^1.2.2",
"@progress/kendo-react-animation": "^4.8.0",
"@progress/kendo-react-common": "^4.8.0",
"@progress/kendo-react-data-tools": "^4.8.0",
"@progress/kendo-react-dateinputs": "^4.8.0",
"@progress/kendo-react-dropdowns": "^4.8.0",
"@progress/kendo-react-excel-export": "^5.1.0",
"@progress/kendo-react-grid": "^4.8.0",
"@progress/kendo-react-inputs": "^4.8.0",
"@progress/kendo-react-intl": "^4.8.0",
"@progress/kendo-react-layout": "^4.8.0",
"@progress/kendo-react-pdf": "^5.1.0",
"@progress/kendo-react-popup": "^4.8.0",
"@progress/kendo-react-progressbars": "^4.8.0",
"@progress/kendo-react-treeview": "^4.8.0",
"@progress/kendo-theme-default": "4.40.0",
"@progress/kendo-theme-material": "^4.41.0",
"@react-pdf/renderer": "^2.1.1",
"@reduxjs/toolkit": "^1.7.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/axios": "^0.14.0",
"@types/jest": "^26.0.15",
"@types/match-sorter": "^6.0.0",
"@types/node": "12.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-otp-input": "^2.0.0",
"@types/react-router-dom": "^5.1.7",
"@types/react-table": "^7.7.0",
"@types/redux-saga": "^0.10.5",
"@types/styled-components": "^5.1.9",
"@types/uuid": "^8.3.0",
"axios": "^0.21.1",
"clsx": "^1.1.1",
"date-fns": "^2.21.3",
"dotenv": "^14.3.2",
"eslint-config-react-app": "^6.0.0",
"formik": "^2.2.9",
"google-map-react": "^2.1.10",
"i18next": "^20.2.2",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.5.23",
"jss": "^10.6.0",
"jss-rtl": "^0.3.0",
"lodash": "^4.17.21",
"lodash.sortby": "^4.7.0",
"lodash.sum": "^4.0.2",
"match-sorter": "^6.3.0",
"moment": "^2.29.1",
"pdfmake": "^0.2.4",
"pdfmake-unicode": "^0.0.1",
"print-js": "^1.6.0",
"querystring": "^0.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-error-boundary": "^3.1.4",
"react-export-table-to-excel": "^1.0.3",
"react-google-autocomplete": "^2.6.1",
"react-google-maps": "^9.4.5",
"react-hook-form": "^7.30.0",
"react-i18next": "^11.8.15",
"react-motion": "^0.5.2",
"react-otp-input": "^2.3.0",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-table": "^7.7.0",
"react-to-print": "^2.14.6",
"react-tooltip": "^4.2.21",
"redux": "^4.1.0",
"redux-devtools-extension": "^2.13.9",
"redux-saga": "^1.1.3",
"rfdc": "^1.3.0",
"styled-components": "^5.3.3",
"typescript": "^4.1.2",
"uuid": "^8.3.2",
"web-vitals": "^1.0.1",
"xml2json": "^0.12.0",
"xlsx": "^0.18.0",
"yup": "^0.32.11"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts --max_old_space_size=4096 build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/google-map-react": "^2.1.2",
"@types/lodash.sortby": "^4.7.6",
"@types/lodash.sum": "^4.0.6",
"@types/react": "^17.0.38",
"@types/react-motion": "^0.0.33",
"@types/react-redux": "^7.1.16",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"@welldone-software/why-did-you-render": "^7.0.1",
"eslint": "^7.2.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^1.7.0",
"netlify-cli": "^6.7.7",
"prettier": "^2.2.1",
"react-to-pdf": "^0.0.14"
}
}

Thanks