themesberg / volt-react-dashboard

Free and open source React.js admin dashboard template and UI library based on Bootstrap 5
https://demo.themesberg.com/volt-react-dashboard
MIT License
917 stars 377 forks source link

Failed To Install Dependencies sass outdated #17

Closed binarique closed 2 years ago

binarique commented 2 years ago

I am trying to install dependencies but i stop half way and I think the error comes from node-sass lib which I have been not familiar with but I installed this version: node-sass 6.0.1 (Wrapper) [JavaScript] libsass 3.5.5 (Sass Compiler) [C/C++] Here is a snippet of the error , any help will be highly appreciated Thank You

npm ERR! code 1 npm ERR! path C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-sass npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= npm ERR! gyp info it worked if it ends with ok npm ERR! gyp verb cli [ npm ERR! gyp verb cli 'C:\Program Files\nodejs\node.exe', npm ERR! gyp verb cli 'C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-gyp\bin\node-gyp.js', npm ERR! gyp verb cli 'rebuild', npm ERR! gyp verb cli '--verbose', npm ERR! gyp verb cli '--libsass_ext=', npm ERR! gyp verb cli '--libsass_cflags=', npm ERR! gyp verb cli '--libsass_ldflags=', npm ERR! gyp verb cli '--libsass_library=' npm ERR! gyp verb cli ] npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@16.13.1 | win32 | x64 npm ERR! gyp verb command rebuild [] npm ERR! gyp verb command clean [] npm ERR! gyp verb clean removing "build" directory npm ERR! gyp verb command configure [] npm ERR! gyp verb check python checking for Python executable "python2" in the PATH npm ERR! gyp verb which failed Error: not found: python2 npm ERR! gyp verb which failed at getNotFoundError (C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\which\which.js:13:12) npm ERR! gyp verb which failed at F (C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\which\which.js:68:19) npm ERR! gyp verb which failed at E (C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\which\which.js:80:29) npm ERR! gyp verb which failed at C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\which\which.js:89:16 npm ERR! gyp verb which failed at C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\isexe\index.js:42:5 npm ERR! gyp verb which failed at C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\isexe\windows.js:36:5 npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:198:21) npm ERR! gyp verb which failed python2 Error: not found: python2 npm ERR! gyp verb which failed at getNotFoundError (C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\which\which.js:13:12) npm ERR! gyp verb which failed at F (C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\which\which.js:68:19) npm ERR! gyp verb which failed at E (C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\which\which.js:80:29) npm ERR! gyp verb which failed at C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\which\which.js:89:16 npm ERR! gyp verb which failed at C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\isexe\index.js:42:5 npm ERR! gyp verb which failed at C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\isexe\windows.js:36:5 npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:198:21) { npm ERR! gyp verb which failed code: 'ENOENT' npm ERR! gyp verb which failed } npm ERR! gyp verb check python checking for Python executable "python" in the PATH npm ERR! gyp verb which succeeded python C:\Users\HP.windows-build-tools\python27\python.EXE npm ERR! gyp verb check python version C:\Users\HP\.windows-build-tools\python27\python.EXE -c "import sys; print "2.7.15 npm ERR! gyp verb check python version .%s.%s" % sys.version_info[:3];" returned: %j npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 16.13.1 npm ERR! gyp verb command install [ '16.13.1' ] npm ERR! gyp verb install input version string "16.13.1" npm ERR! gyp verb install installing version: 16.13.1 npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed npm ERR! gyp verb install version not already installed, continuing with install 16.13.1 npm ERR! gyp verb ensuring nodedir is created C:\Users\HP.node-gyp\16.13.1 npm ERR! gyp verb created nodedir C:\Users\HP.node-gyp npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.1/node-v16.13.1-headers.tar.gz npm ERR! gyp http 200 https://nodejs.org/download/release/v16.13.1/node-v16.13.1-headers.tar.gz npm ERR! gyp verb extracted file from tarball include\node\common.gypi npm ERR! gyp verb extracted file from tarball include\node\config.gypi npm ERR! gyp verb extracted file from tarball include\node\node.h npm ERR! gyp verb extracted file from tarball include\node\node_api.h npm ERR! gyp verb extracted file from tarball include\node\js_native_api.h npm ERR! gyp verb extracted file from tarball include\node\js_native_api_types.h npm ERR! gyp verb extracted file from tarball include\node\node_api_types.h

The error continues even here

gyp verb find vs2017 using installation: C:\Program Files\Microsoft Visual Studio\2022\Community npm ERR! gyp verb build/config.gypi creating config file npm ERR! gyp verb build/config.gypi writing out config file: C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-sass\build\config.gypi npm ERR! (node:3088) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. npm ERR! (Use node --trace-deprecation ... to show where the warning was created) npm ERR! gyp verb config.gypi checking for gypi file: C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-sass\config.gypi npm ERR! gyp verb common.gypi checking for gypi file: C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-sass\common.gypi npm ERR! gyp verb gyp gyp format was not specified; forcing "msvs" npm ERR! gyp info spawn C:\Users\HP.windows-build-tools\python27\python.EXE npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\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 '-G', npm ERR! gyp info spawn args 'msvs_version=2015', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-sass\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\HP\.node-gyp\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\HP\.node-gyp\16.13.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\Users\HP\.node-gyp\16.13.1\<(target_arch)\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-sass', 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\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-sass\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp verb command build [] npm ERR! gyp verb build type Release npm ERR! gyp verb architecture x64 npm ERR! gyp verb node dev dir C:\Users\HP.node-gyp\16.13.1 npm ERR! gyp verb found first Solution file build/binding.sln npm ERR! gyp verb using MSBuild: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\15.0\Bin\MSBuild.exe npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\15.0\Bin\MSBuild.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'build/binding.sln', npm ERR! gyp info spawn args '/nologo', npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! UNCAUGHT EXCEPTION npm ERR! gyp ERR! stack Error: spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\15.0\Bin\MSBuild.exe ENOENT npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19) npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:477:16) npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21) npm ERR! gyp ERR! System Windows_NT 10.0.19043 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" npm ERR! gyp ERR! cwd C:\Users\HP\Documents\ReactWorkspace\volt-react-dashboard\node_modules\node-sass npm ERR! gyp ERR! node -v v16.13.1 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! This is a bug in node-gyp. npm ERR! gyp ERR! Try to update node-gyp and file an Issue if it does not help: npm ERR! gyp ERR! https://github.com/nodejs/node-gyp/issues npm ERR! Build failed with error code: 7

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\HP\AppData\Local\npm-cache_logs\2022-03-24T16_40_36_345Z-debug.log

binarique commented 2 years ago

just uninstalled the "node-sass 4.14.4" and upgraded to run "npm install sass" Here is my new package.json depencies

{ "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-brands-svg-icons": "^5.15.4", "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/react-fontawesome": "^0.1.17", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", "@themesberg/react-bootstrap": "^1.4.1", "bootstrap": "5.0.0-beta1", "chartist": "^0.11.4", "chartist-plugin-tooltips-updated": "^0.1.4", "moment-timezone": "^0.5.31", "react": "^16.13.1", "react-chartist": "^0.14.4", "react-copy-to-clipboard": "^5.0.3", "react-datetime": "^3.0.4", "react-dom": "^16.13.1", "react-github-btn": "^1.2.0", "react-live": "^2.2.3", "react-router-dom": "^5.2.0", "react-router-hash-link": "^2.3.1", "react-scripts": "3.4.3", "react-transition-group": "^4.4.1", "sass": "^1.49.9", "simplebar-react": "^2.3.0" }

got solution here https://stackoverflow.com/questions/64625050/error-node-sass-version-5-0-0-is-incompatible-with-4-0-0

just take note of deprecated warnings as some are not supported as of sass 2.0.0, so you need to fix that as everything is working fine Most of these warning comes from bootstrap , so make sure you upgrade that to the latest version