Yarn install generating errors gyp ERR! find VS - c++

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 node-gyp#7.1.2
gyp info using node#19.4.0 | 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
Different versions of node.
Install C++ desktop development.
Uninstall and reinstall node
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

Related

installing the truffle I am having these errors(already installed latest versions of vs code and node.js)

i have used the "npm install -g truffle" command to install truffle but iam having these errors and having problem with truffle init also
npm ERR! code 1
npm ERR! path C:\Users\LAKSHMAN\localblockvote\node_modules\ganache\node_modules\leveldown
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#8.4.1
npm ERR! gyp info using node#16.14.2 | win32 | x64
npm ERR! gyp info find Python using Python version 3.7.9 found at "C:\Users\LAKSHMAN\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\LAKSHMAN\AppData\Local\npm-cache\_logs\2022-04-01T17_32_56_175Z-debug-0.log

Getting a error when installing TRUFFLE on windows

I have tried installing truffle on windows powershell with Execution Policy set to "ByPass".
And installing a older version but noting has worked any help is appreciated.
I have node v16.13.0. And have not had any problems before with installing packages.
As well I have the latest version of Virtual studio code.
npm ERR! code 1
npm ERR! path C:\Users\boxin\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\secp256k1
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#8.2.0
npm ERR! gyp info using node#16.13.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.0 found at "C:\Users\boxin\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\boxin\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\secp256k1
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
Hello did u try npm install --g --production windows-build-tools
Similar problem -> node-gyp configure got "gyp ERR! find VS"
Lot of ppl had similiar issue and this command helped
If nothing will help i can recommend u https://remix.ethereum.org/ its online IDE that simulate everything. (I have good experience with it on Ether and solidity)
I fix the problem by uninstalling node.js and reinstall in it. And when i installed node, I checked the box that shows up that installs extra build tools.

Pinax npm installation failure

Can someone please look into the below error stack? I was trying to set up pinax.
(venv) C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite>npm install
npm WARN deprecated chokidar#1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated request#2.79.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface
has changed to use Promises in 1.x.)
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated request#2.81.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, up
grade your dependencies to the actual version of core-js#3.
npm WARN deprecated hawk#3.1.3: This module moved to #hapi/hawk. Please make sure to switch over as this distribution is no longer supported
and may contain bugs and critical security issues.
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated uws#9.14.0: New code is available at github.com/uNetworking/uWebSockets.js
npm WARN deprecated hoek#2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgra
de to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support
is available for older versions (hapi.im/commercial).
npm WARN deprecated boom#2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgra
de to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support
is available for older versions (hapi.im/commercial).
npm WARN deprecated cryptiles#2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please u
pgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid supp
ort is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp#1.0.9: This module moved to #hapi/sntp. Please make sure to switch over as this distribution is no longer supported
and may contain bugs and critical security issues.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
> uws#9.14.0 install C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
> node-sass#4.7.2 install C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-72_binding.node":
connect ETIMEDOUT 140.82.112.3:443
Timed out whilst downloading the prebuilt binary
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> core-js#2.6.11 postinstall C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> node-sass#4.7.2 postinstall C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\node-sass
> node scripts/build.js
Building: C:\Program Files\nodejs\node.exe C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\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 'C:\\Users\\ZinonYT\\PycharmProjects\\ReadyMade\\mysite\\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 node-gyp#3.8.0
gyp info using node#12.18.2 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:167:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:167:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Users\ZinonYT\PycharmProjects\ReadyMade\venv\Scripts\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\ZinonYT\PycharmProjects\ReadyMade\venv\Scripts\python.EXE -c import sys; print "%s.%s.%s" % s
ys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:303:12)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ZinonYT\\PycharmProjects\\ReadyMade\\mysite\\node_modules\\node-gyp\\bin\
\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\ZinonYT\PycharmProjects\ReadyMade\mysite\node_modules\node-sass
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":
"win32","arch":"x64"})
npm WARN bootstrap#4.0.0 requires a peer of popper.js#^1.12.9 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords#3.5.1 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.7.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.7.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ZinonYT\AppData\Roaming\npm-cache\_logs\2020-07-11T09_19_41_066Z-debug.log
the npm sass used by the project is node-sass#4.7.2 but the node i installed was 10 in order to use node-sass#4.7.2 node 8 must be installed not 10 . so uninstall node 10 and install node 8.
We are talking about doing an update of dependencies in a current release. Perhaps that will be fixed.

NPM install: Platform Toolset = v141 cannot be found

I'm trying to install this library Barcode-Scanner-npm but the installation fails and displays this error:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build t
ools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 bui
ld tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-cli
ck the solution, and then selecting "Retarget solution". [C:\Users\bla\Desktop\bla\myProject\node_modules\#serialport\bin
dings\build\bindings.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\bla\Desktop\bla\myProject\node_modules\#serialport\bindings
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN myProject#1.0.0 No description
npm WARN myProject#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! #serialport/bindings#2.0.2 install: `prebuild-install --tag-prefix #serialport/bindings# || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #serialport/bindings#2.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\bla\AppData\Roaming\npm-cache\_logs\2018-09-10T10_13_47_454Z-debug.log
I tried some solutions I found on the web like installing this:
npm i windows-build-tools
but it doesn't work for me.
I got VS2017 installed and also the Platform Toolset v141 as you can see here (last checkbox): VS17 Updater
Can you try installing windows-build-tools this way
npm install --global --production windows-build-tools
Open a cmd.exe and see, what version of MSBuild is on your path. If there is one and it is an older version (as was the case for me), remove it from the path - at least for the time of your npm install - and try again.
See also my answer here for slightly more details: https://stackoverflow.com/a/54300218/709537

error MSB8007: The Platform for project XXX is invalid. Platform='x64'

I have switched from a 32 bits to a 64 bits laptop and I am trying to npm install a node.js project with a dependency to "swisseph": "0.5.6".
Everything was working fine under 32 bits, but now it is not working anymore. I get the following error message:
C:\Users\jverstrynge\Documents\Private\Free Time\ChartVibes>npm install
|
> swisseph#0.5.6 install C:\Users\jverstrynge\Documents\Private\Free Time\ChartVibes\node_modules\swisseph
> node-gyp rebuild
C:\Users\jverstrynge\Documents\Private\Free Time\ChartVibes\node_modules\swisseph>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platf
orm for project 'swissephz.vcxproj' is invalid. Platform='x64'. You may be seeing this message because you are trying
to build a project without a solution file, and have specified a non-default Platform that doesn't exist for this proje
ct. [C:\Users\jverstrynge\Documents\Private\Free Time\ChartVibes\node_modules\swisseph\build\deps\swisseph\swissephz.vc
xproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\jverstrynge\Documents\Private\Free Time\ChartVibes\node_modules\swisseph
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.3
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! swisseph#0.5.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the swisseph#0.5.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the swisseph package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls swisseph
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\jverstrynge\Documents\Private\Free Time\ChartVibes\npm-debug.log
I have Microsoft Visual C++ 2010 Express installed. Anybody knows how to solve this?
To build x64 project with Visual C++ 2010 Express download and install the Windows Software Development Kit version 7.1
Visual C++ 2010 Express does not include a 64 bit compiler, but the SDK does. If you still doesn't have x64 compiler for Visual C++ 2010 please read this: http://support.microsoft.com/kb/2519277