I’m trying to install dependencies for a frontend project from GitHub, but I keep encountering the same error during installation.
The error that keeps occurring
PS C:UsersUserDesktopInternshipCo-op Taskco-opclient> npm install
npm warn deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm warn deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm warn deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated [email protected]: this library is no longer supported
npm warn deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup 'C:\Users\User\Desktop\Internship\Co-op Task\co-op\client\node_modules\eslint-plugin-react',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_moduleseslint-plugin-reactnode_modulesresolvetestresolvermultirepopackagespackage-b'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'C:\Users\User\Desktop\Internship\Co-op Task\co-op\client\node_modules\eslint-plugin-react\node_modules\resolve\test\resolver\multirepo\packages\package-b'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error code 1
npm error path C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-sass
npm error command failed
npm error command C:WINDOWSsystem32cmd.exe /d /s /c node scripts/build.js
npm error Building: C:Program Filesnodejsnode.exe C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-gypbinnode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm error gyp info it worked if it ends with ok
npm error gyp verb cli [
npm error gyp verb cli 'C:\Program Files\nodejs\node.exe',
npm error gyp verb cli 'C:\Users\User\Desktop\Internship\Co-op Task\co-op\client\node_modules\node-gyp\bin\node-gyp.js',
npm error gyp verb cli 'rebuild',
npm error gyp verb cli '--verbose',
npm error gyp verb cli '--libsass_ext=',
npm error gyp verb cli '--libsass_cflags=',
npm error gyp verb cli '--libsass_ldflags=',
npm error gyp verb cli '--libsass_library='
npm error gyp verb cli ]
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp verb command rebuild []
npm error gyp verb command clean []
npm error gyp verb clean removing "build" directory
npm error gyp verb command configure []
npm error gyp verb find Python Python is not set from command line or npm configuration
npm error gyp verb find Python Python is not set from environment variable PYTHON
npm error gyp verb find Python checking if "python3" can be used
npm error gyp verb find Python - executing "python3" to get executable path
npm error gyp verb find Python - "python3" is not in PATH or produced an error
npm error gyp verb find Python checking if "python" can be used
npm error gyp verb find Python - executing "python" to get executable path
npm error gyp verb find Python - executable path is "C:UsersUserAppDataLocalProgramsPythonPython313python.exe"
npm error gyp verb find Python - executing "C:UsersUserAppDataLocalProgramsPythonPython313python.exe" to get version
npm error gyp verb find Python - version is "3.13.0"
npm error gyp info find Python using Python version 3.13.0 found at "C:UsersUserAppDataLocalProgramsPythonPython313python.exe"
npm error gyp verb get node dir no --target version specified, falling back to host node version: 20.16.0
npm error gyp verb command install [ '20.16.0' ]
npm error gyp verb install input version string "20.16.0"
npm error gyp verb install installing version: 20.16.0
npm error gyp verb install --ensure was passed, so won't reinstall if already installed
npm error gyp verb install version is already installed, need to check "installVersion"
npm error gyp verb got "installVersion" 9
npm error gyp verb needs "installVersion" 9
npm error gyp verb install version is good
npm error gyp verb get node dir target node version installed: 20.16.0
npm error gyp verb build dir attempting to create "build" dir: C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-sassbuild
npm error gyp verb build dir "build" dir needed to be created? Yes
npm error gyp verb find VS msvs_version not set from command line or npm config
npm error gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm error gyp verb find VS checking VS2022 (17.12.35527.113) found at:
npm error gyp verb find VS "C:Program Files (x86)Microsoft Visual Studio2022BuildTools"
npm error gyp verb find VS - found "Visual Studio C++ core features"
npm error gyp verb find VS - found VC++ toolset: v143
npm error gyp verb find VS - missing any Windows SDK
npm error gyp verb find VS checking VS2022 (17.11.35219.272) found at:
npm error gyp verb find VS "C:Program FilesMicrosoft Visual Studio2022Community"
npm error gyp verb find VS - found "Visual Studio C++ core features"
npm error gyp verb find VS - missing any VC++ toolset
npm error gyp verb find VS could not find a version of Visual Studio 2017 or newer to use
npm error gyp verb find VS looking for Visual Studio 2015
npm error gyp verb find VS - not found
npm error gyp verb find VS not looking for VS2013 as it is only supported up to Node.js 8
npm error gyp ERR! find VS
npm error gyp ERR! find VS msvs_version not set from command line or npm config
npm error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm error gyp ERR! find VS checking VS2022 (17.12.35527.113) found at:
npm error gyp ERR! find VS "C:Program Files (x86)Microsoft Visual Studio2022BuildTools"
npm error gyp ERR! find VS - found "Visual Studio C++ core features"
npm error gyp ERR! find VS - found VC++ toolset: v143
npm error gyp ERR! find VS - missing any Windows SDK
npm error gyp ERR! find VS checking VS2022 (17.11.35219.272) found at:
npm error gyp ERR! find VS "C:Program FilesMicrosoft Visual Studio2022Community"
npm error gyp ERR! find VS - found "Visual Studio C++ core features"
npm error gyp ERR! find VS - missing any VC++ toolset
npm error gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm error gyp ERR! find VS looking for Visual Studio 2015
npm error gyp ERR! find VS - not found
npm error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm error gyp ERR! find VS
npm error gyp ERR! find VS **************************************************************
npm error gyp ERR! find VS You need to install the latest version of Visual Studio
npm error gyp ERR! find VS including the "Desktop development with C++" workload.
npm error gyp ERR! find VS For more information consult the documentation at:
npm error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm error gyp ERR! find VS **************************************************************
npm error gyp ERR! find VS
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm error gyp ERR! stack at VisualStudioFinder.fail (C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-gyplibfind-visualstudio.js:122:47)
npm error gyp ERR! stack at C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-gyplibfind-visualstudio.js:75:16
npm error gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-gyplibfind-visualstudio.js:363:14)
npm error gyp ERR! stack at C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-gyplibfind-visualstudio.js:71:14
npm error gyp ERR! stack at C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-gyplibfind-visualstudio.js:384:16
npm error gyp ERR! stack at C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-gyplibutil.js:54:7
npm error gyp ERR! stack at C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-gyplibutil.js:33:16
npm error gyp ERR! stack at ChildProcess.exithandler (node:child_process:430:5)
npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm error gyp ERR! stack at maybeClose (node:internal/child_process:1105:16)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error gyp ERR! System Windows_NT 10.0.26100
npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\User\Desktop\Internship\Co-op Task\co-op\client\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm error gyp ERR! cwd C:UsersUserDesktopInternshipCo-op Taskco-opclientnode_modulesnode-sass
npm error gyp ERR! node -v v20.16.0
npm error gyp ERR! node-gyp -v v8.4.1
npm error gyp ERR! not ok
npm error Build failed with error code: 1
npm error A complete log of this run can be found in: C:UsersUserAppDataLocalnpm-cache_logs2025-01-12T21_27_56_601Z-debug-0.log
These are the dependencies
"dependencies":
"@reduxjs/toolkit": "^1.8.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.1.1",
"@testing-library/user-event": "^14.1.1",
"axios": "^0.27.2",
"node-sass": "^7.0.1",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-google-recaptcha": "^2.1.0",
"react-hot-toast": "^2.3.0",
"react-icons": "^4.3.1",
"react-redux": "^8.0.1",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
Here are the versions of the tools I’m using
- Node.js version: v20.16.0.
- Python version: 3.13.0.
- MVC tools:17.12.3 (installed with C++ and Windows SDK).
What seems to be the problem, and how can I fix it?
2
Answers
I found the issue—it wasn't the code itself. The project was using node-sass, which is no longer supported. To fix it, I uninstalled node-sass and installed sass instead. Here's how I did it:
Uninstall node-sass:
npm uninstall node-sass
install sass:
npm install sass
This resolved the issue for me. Make sure to update any configurations that reference node-sass if needed.
try some of the solutions from this answer. it looks like the problems are with gyp not finding your python install, so it wouldn’t hurt to reinstall python as well.