I have npm -v : 9.3.1 node -v : v19.4.0 yarn -v : 1.22.19
I am running a react js app using using yarn but yarn install not working and generating errors. Errors are
error E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-sass
Output:
Building: C:\Program Files\nodejs\node.exe E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'E:\\Official Projects\\New folder\\Cirrus.ReactUI\\reactapp\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - "python3" is not in PATH or produced an error
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp verb find Python - executable path is "C:\Users\hassaahm\AppData\Local\Programs\Python\Python311\python.exe"
gyp verb find Python - executing "C:\Users\hassaahm\AppData\Local\Programs\Python\Python311\python.exe" to get version
gyp verb find Python - version is "3.11.0"
gyp info find Python using Python version 3.11.0 found at "C:\Users\hassaahm\AppData\Local\Programs\Python\Python311\python.exe"
gyp verb get node dir no --target version specified, falling back to host node version: 19.4.0
gyp verb command install [ '19.4.0' ]
gyp verb install input version string "19.4.0"
gyp verb install installing version: 19.4.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 19.4.0
gyp verb build dir attempting to create "build" dir: E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-sass\build
gyp verb find VS msvs_version was set from command line or npm config
gyp verb find VS - looking for Visual Studio version 2022
gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp verb find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp verb find VS could not find a version of Visual Studio 2017 or newer to use
gyp verb find VS looking for Visual Studio 2015
gyp verb find VS - not found
gyp verb find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS msvs_version was set from command line or npm config
gyp ERR! find VS - looking for Visual Studio version 2022
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS valid versions for msvs_version:
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (node:child_process:427:5)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at maybeClose (node:internal/child_process:1098:16)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Official Projects\\New folder\\Cirrus.ReactUI\\reactapp\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd E:\Official Projects\New folder\Cirrus.ReactUI\reactapp\node_modules\node-sass
gyp ERR! node -v v19.4.0
I tried
The project is a .Net Solution. Mean the .net solution has the react app but it should work separately also.
When running yarn start I get
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:140:10)
at module.exports (E:\Official Projects\Cirrus.ReactUI\reactapp\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (E:\Official Projects\Cirrus.ReactUI\reactapp\node_modules\webpack\lib\NormalModule.js:417:16)
at E:\Official Projects\Cirrus.ReactUI\reactapp\node_modules\webpack\lib\NormalModule.js:452:10
at E:\Official Projects\Cirrus.ReactUI\reactapp\node_modules\webpack\lib\NormalModule.js:323:13
at E:\Official Projects\Cirrus.ReactUI\reactapp\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at E:\Official Projects\Cirrus.ReactUI\reactapp\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at context.callback (E:\Official Projects\Cirrus.ReactUI\reactapp\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at E:\Official Projects\Cirrus.ReactUI\reactapp\node_modules\babel-loader\lib\index.js:59:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
The problem seems to be the unstable node version. Try running older versions, Mine worked with v14.16.1