getting so many errors while doing "npm install" - node.js

I am working on an ASP.NET Core Web Application with Angular (I have VS2019 Enterprise installed on Windows 10), it is working fine and everything but when I try to publish it to Azure App Service. I get many errors on the npm i step.
I tried all the solutions I could find:
install windows-build-tools
update visual studio and install Desktop Build Tools
install node-gyp
modify configure.js of node-gyp in node_modules
Uninstall Node and reinstall the latest version
I still cannot make it work.
the latest error I got is this :
npm install
> node-sass#4.9.3 install C:\Users\bibaghdad\Documents\Projects\commercial-innovation-portal\InnovationsPortal\ClientApp\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node":
HTTP error 404 Not Found
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
> node-sass#4.9.3 postinstall C:\Users\bibaghdad\Documents\Projects\commercial-innovation-portal\InnovationsPortal\ClientApp\node_modules\node-sass
> node scripts/build.js
Building: C:\Program Files\nodejs\node.exe C:\Users\bibaghdad\Documents\Projects\commercial-innovation-portal\InnovationsPortal\ClientApp\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\\bibaghdad\\Documents\\Projects\\commercial-innovation-portal\\InnovationsPortal\\ClientApp\\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.14.1 | 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` succeeded python2 C:\Python27\python2.EXE
gyp verb check python version `C:\Python27\python2.EXE -c "import sys; print "2.7.17
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 12.14.1
gyp verb command install [ '12.14.1' ]
gyp verb install input version string "12.14.1"
gyp verb install installing version: 12.14.1
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: 12.14.1
gyp verb build dir attempting to create "build" dir: C:\Users\bibaghdad\Documents\Projects\commercial-innovation-portal\InnovationsPortal\ClientApp\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? C:\Users\bibaghdad\Documents\Projects\commercial-innovation-portal\InnovationsPortal\ClientApp\node_modules\node-sass\build
gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.Windows10SDK.18362
gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64
gyp verb find vs2017 - Found Microsoft.VisualStudio.VC.MSBuild.Base
gyp verb find vs2017 - Using this installation with Windows 10 SDK
gyp verb find vs2017 using installation: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Users\bibaghdad\Documents\Projects\commercial-innovation-portal\InnovationsPortal\ClientApp\node_modules\node-sass\build\config.gypi
gyp verb config.gypi checking for gypi file: C:\Users\bibaghdad\Documents\Projects\commercial-innovation-portal\InnovationsPortal\ClientApp\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: C:\Users\bibaghdad\Documents\Projects\commercial-innovation-portal\InnovationsPortal\ClientApp\node_modules\node-sass\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Python27\python2.EXE
gyp info spawn args [
gyp info spawn args 'C:\\Users\\bibaghdad\\Documents\\Projects\\commercial-innovation-portal\\InnovationsPortal\\ClientApp\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=2015',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\bibaghdad\\Documents\\Projects\\commercial-innovation-portal\\InnovationsPortal\\ClientApp\\node_modules\\node-sass\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\bibaghdad\\Documents\\Projects\\commercial-innovation-portal\\InnovationsPortal\\ClientApp\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\bibaghdad\\.node-gyp\\12.14.1\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\bibaghdad\\.node-gyp\\12.14.1',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\bibaghdad\\Documents\\Projects\\commercial-innovation-portal\\InnovationsPortal\\ClientApp\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\bibaghdad\\.node-gyp\\12.14.1\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\bibaghdad\\Documents\\Projects\\commercial-innovation-portal\\InnovationsPortal\\ClientApp\\node_modules\\node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\bibaghdad\\Documents\\Projects\\commercial-innovation-portal\\InnovationsPortal\\ClientApp\\node_modules\\node-sass\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\bibaghdad\.node-gyp\12.14.1
gyp verb found first Solution file build/binding.sln
gyp verb using MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
gyp ERR! UNCAUGHT EXCEPTION
EXEC(0,0): Error : spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
gyp ERR! stack at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:81:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\bibaghdad\\Documents\\Projects\\commercial-innovation-portal\\InnovationsPortal\\ClientApp\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\bibaghdad\Documents\Projects\commercial-innovation-portal\InnovationsPortal\ClientApp\node_modules\node-sass
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! <https://github.com/nodejs/node-gyp/issues>
EXEC(0,0): Error code: 7
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\karma\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\#angular\compiler-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.9.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.9.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

You can try to remove package-lock.json and relaunch npm install
It worked for me, thanks to this comment https://github.com/sass/node-sass/issues/2773#issuecomment-559399501

I suspect it is an issue with node-gyp. From your error log I can see the version is old [3.x] which shouldn't be and you should update the version to latest.
If you are using MacOS, you can update node-gyp to latest version using this command:
$ [sudo] npm explore npm -g -- npm install node-gyp#latest
The sudo above is optional. Use it only if necessary.
If you are on Windows, you can update the node-gyp version to latest following the document here
If this resolves your problem and you are curious about node-gyp you can always read it here

Related

Reactjs node gyp error when installing node sass

I was trying to build a new project on React and I want to use SASS, but when I start installing npm install node-sass it gives me this node-gyp error
jake#Ehys-Air portfolio % npm install node-sass
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated uuid#3.4.0: 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 deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /Users/jake/Development/portfolio/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /Users/jake/Development/portfolio/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 '/usr/local/bin/node',
npm ERR! gyp verb cli '/Users/jake/Development/portfolio/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#8.4.1
npm ERR! gyp info using node#18.4.0 | darwin | arm64
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 find Python Python is not set from command line or npm configuration
npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
npm ERR! gyp verb find Python checking if "python3" can be used
npm ERR! gyp verb find Python - executing "python3" to get executable path
npm ERR! gyp verb find Python - executable path is "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
npm ERR! gyp verb find Python - executing "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3" to get version
npm ERR! gyp verb find Python - version is "3.9.10"
npm ERR! gyp info find Python using Python version 3.9.10 found at "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 18.4.0
npm ERR! gyp verb command install [ '18.4.0' ]
npm ERR! gyp verb install input version string "18.4.0"
npm ERR! gyp verb install installing version: 18.4.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 18.4.0
npm ERR! gyp verb build dir attempting to create "build" dir: /Users/jake/Development/portfolio/node_modules/node-sass/build
npm ERR! gyp verb build dir "build" dir needed to be created? Yes
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: /Users/jake/Development/portfolio/node_modules/node-sass/build/config.gypi
npm ERR! gyp verb config.gypi checking for gypi file: /Users/jake/Development/portfolio/node_modules/node-sass/config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: /Users/jake/Development/portfolio/node_modules/node-sass/common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "make"
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/jake/Development/portfolio/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 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/jake/Development/portfolio/node_modules/node-sass/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/jake/Development/portfolio/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/jake/Library/Caches/node-gyp/18.4.0/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=/Users/jake/Library/Caches/node-gyp/18.4.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/jake/Development/portfolio/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/jake/Library/Caches/node-gyp/18.4.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/jake/Development/portfolio/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 '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 arm64
npm ERR! gyp verb node dev dir /Users/jake/Library/Caches/node-gyp/18.4.0
npm ERR! gyp verb `which` succeeded for `make` /usr/bin/make
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
npm ERR! Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
npm ERR! See `man xcode-select` for more details.
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/jake/Development/portfolio/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:537:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/jake/Development/portfolio/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/jake/Development/portfolio/node_modules/node-sass
npm ERR! gyp ERR! node -v v18.4.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jake/.npm/_logs/2022-07-23T07_23_01_464Z-debug-0.log
I am not sure why this is happening because before I used to use SASS/SCSS on my previous react builds. This is kind of frustrating to be honest for a newbie dev like me.
Fixed this problem by installing xcode-select --install because I don't have this command line tools npm ERR! xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist

npm install error code 1failled to build project

I wanted to install npm in my project folder but I always have error. I searched a lot and tried different things like installing windows-build-tools with yarn and npm but both freezes in the middel. I have also tried to delete node_modules folder but it gives an eeror that it cannot find it afterwards.I reinstalled node and node-ssas but none worked. I installed python 2.7 and gave the path to node but it seems it wants to download it again. can someone help me what is the problem?
I'm using windows 10
node version 6.14.0
npm 8.3.1
python 2.7
yarn 1.22.17
the latest error is this
ERROR MESSAGE:
'''
npm ERR! code 1
npm ERR! path V:\VOCSensServer\vocsensuimanager\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:\programs\node\node.exe
V:\VOCSensServer\vocsensuimanager\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:\\programs\\node\\node.exe',
npm ERR! gyp verb cli 'V:\\VOCSensServer\\vocsensuimanager\\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.14.0 | 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 "c:\programs\python27\python.exe" in the PATH
npm ERR! gyp verb `which` succeeded c:\programs\python27\python.exe c:\programs\python27\python.exe
npm ERR! gyp verb check python version `c:\programs\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.14.0
npm ERR! gyp verb command install [ '16.14.0' ]
npm ERR! gyp verb install input version string "16.14.0"
npm ERR! gyp verb install installing version: 16.14.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 16.14.0
npm ERR! gyp verb build dir attempting to create "build" dir:V:\VOCSensServer\vocsensuimanager\node_modules\node-sass\build
npm ERR! gyp verb build dir "build" dir needed to be created? V:\VOCSensServer\vocsensuimanager\node_modules\node-sass\build
npm ERR! gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
npm ERR! gyp verb find vs2017 - Missing Visual Studio C++ core features (Microsoft.VisualStudio.VC.MSBuild.Base)
npm ERR! gyp verb find vs2017 - Missing VC++ 2017 v141 toolset (x86,x64) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64)
npm ERR! gyp verb find vs2017 - Missing a Windows SDK (Microsoft.VisualStudio.Component.Windows10SDK.* or Microsoft.VisualStudio.Component.Windows81SDK)
npm ERR! gyp verb find vs2017 - Some required components are missing, not using this installation
npm ERR! gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
npm ERR! gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.Windows10SDK.16299
npm ERR! gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.Windows10SDK.17134
npm ERR! gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.Windows10SDK.17763
npm ERR! gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.Windows10SDK.18362
npm ERR! gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.Windows10SDK.19041
npm ERR! gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64
npm ERR! gyp verb find vs2017 - Found Microsoft.VisualStudio.VC.MSBuild.Base
npm ERR! gyp verb find vs2017 - Using this installation with Windows 10 SDK
npm ERR! gyp verb find vs2017 using installation: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: V:\VOCSensServer\vocsensuimanager\node_modules\node-sass\build\config.gypi
npm ERR! (node:2808) [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: V:\VOCSensServer\vocsensuimanager\node_modules\node-sass\config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: V:\VOCSensServer\vocsensuimanager\node_modules\node-sass\common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "msvs"
npm ERR! gyp info spawn c:\programs\python27\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'V:\\VOCSensServer\\vocsensuimanager\\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 'V:\\VOCSensServer\\vocsensuimanager\\node_modules\\node-sass\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'V:\\VOCSensServer\\vocsensuimanager\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\AndiaFathi\\.node-gyp\\16.14.0\\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\\AndiaFathi\\.node-gyp\\16.14.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=V:\\VOCSensServer\\vocsensuimanager\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\AndiaFathi\\.node-gyp\\16.14.0\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=V:\\VOCSensServer\\vocsensuimanager\\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 'V:\\VOCSensServer\\vocsensuimanager\\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\AndiaFathi\.node-gyp\16.14.0
npm ERR! gyp verb found first Solution file build/binding.sln
npm ERR! gyp verb using MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\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 (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:478:16)
npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\programs\\node\\node.exe" "V:\\VOCSensServer\\vocsensuimanager\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd V:\VOCSensServer\vocsensuimanager\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.14.0
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\AndiaFathi\AppData\Local\npm-cache\_logs\2022-03-14T13_08_19_585Z-debug-0.log
'''
You did right for Python as it says succeeded after checking for the Python executable. But the problem is that there is no 15.0 directory in Visual Studio 2019 (ENOENT).
You should change the path to MSBuild.exe. It should be like:
v2017
npm config set msbuild_path "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe"
npm config set msvs_version 2017
v2019
npm config set msbuild_path "C:\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\MSBuild\\Current\\Bin\\MSBuild.exe"
npm config set msvs_version 2019
v2022
npm config set msbuild_path "C:\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\MSBuild\\Current\\Bin\\MSBuild.exe"
npm config set msvs_version 2022
You can check your npm configuration by using:
npm config list
I had the same problem and found the solution on this post.

npm install no longer works but did an hour ago

Can someone please help me understand what is going on here, this loaded fine an hour ago, but now it won't, I've removed the node modules and run npm cache clear --force, but still nothing. This is the error I'm getting. I'm certain it is something really really simple, I am completely new to javascript, so it's likely to be more obvious than you think.
Building: /usr/bin/node /home/rob/Development/vue-getting-started/03-data-and-events/begin/vue-heroes/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 '/usr/bin/node',
gyp verb cli '/home/rob/Development/vue-getting-started/03-data-and-events/begin/vue-heroes/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#14.15.5 | linux | 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 "/home/rob/anaconda3/bin/python3" in the PATH
gyp verb `which` succeeded /home/rob/anaconda3/bin/python3 /home/rob/anaconda3/bin/python3
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /home/rob/anaconda3/bin/python3 -c import sys; print "%s.%s.%s" % sys.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:308:12)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Linux 5.4.0-65-generic
gyp ERR! command "/usr/bin/node" "/home/rob/Development/vue-getting-started/03-data-and-events/begin/vue-heroes/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/rob/Development/vue-getting-started/03-data-and-events/begin/vue-heroes/node_modules/node-sass
gyp ERR! node -v v14.15.5
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.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.12.0 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! /home/rob/.npm/_logs/2021-02-15T22_46_40_202Z-debug.log
Is there anyone that is familiar with this please, people are suggesting that I install python2.7 and other libraries that are in the error message. I can't read javascript, I'm learning it, but I know this is neither an issue with python2.7 or "node-gyp" as neither of these were installed when I had node running fine. This really is a newbie issue, there must be a simple fix for this.

Yarn install fail with node-sass / node-modules

Rails app
Updating yarn with homebrew to yarn v1.22.10 but then yarn install fail with this error :
yarn install v1.22.10
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > webpack-dev-server#3.11.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
warning "webpack-dev-server > webpack-dev-middleware#3.7.2" has unmet peer dependency "webpack#^4.0.0".
[4/4] 🔨 Building fresh packages...
[-/3] ⠈ waiting...
[-/3] ⠈ waiting...
error /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass
Output:
Building: /usr/local/Cellar/node/15.1.0/bin/node /Users/eliseserres/code/Septlieues/intranet/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 '/usr/local/Cellar/node/15.1.0/bin/node',
gyp verb cli '/Users/eliseserres/code/Septlieues/intranet/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#15.1.0 | darwin | 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 "/usr/bin/python" in the PATH
gyp verb `which` succeeded /usr/bin/python /usr/bin/python
gyp verb check python version `/usr/bin/python -c "import sys; print "2.7.16
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 15.1.0
gyp verb command install [ '15.1.0' ]
gyp verb install input version string "15.1.0"
gyp verb install installing version: 15.1.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: 15.1.0
gyp verb build dir attempting to create "build" dir: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/eliseserres/.node-gyp/15.1.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/eliseserres/.node-gyp/15.1.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/eliseserres/.node-gyp/15.1.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (node:events:327:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/Cellar/node/15.1.0/bin/node" "/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass
gyp ERR! node -v v15.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Trying to update node-sass but yarn add node-sass fail with same error.
node -v -> node v15.1.0
Does someone know what can I do ?
According to this you may have to reinstall Xcode Command-line Tools and then configure node-gyp after that. I suggest you follow this tutorial as it is from the official Node.js developers.
Only node-sass v5 supports Node 15. Since I see webpack included you may be running into the same incompatibility with sass-loader as https://stackoverflow.com/a/64653160/455535

Failed to create ionic project?

This Errors are occurring when I going to create a project.
C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\src\libsass.vcxproj(20,3): error
MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the
declaration is correct, and that the file exists on disk.
PS C:\Users\Tareque\Desktop\ionic apps> ionic start app blank
√ Creating directory .\app - done!
√ Downloading and extracting blank starter - done!
? Would you like to integrate your new app with Cordova to target native iOS and Android? Yes
√ Personalizing ionic.config.json and package.json - done!
> ionic integrations enable cordova --quiet
√ Downloading integration cordova - done!
√ Copying integrations files to project - done!
[OK] Added cordova integration!
Installing dependencies may take several minutes.
* IONIC DEVAPP *
Speed up development with the Ionic DevApp, our fast, on-device testing mobile app
- Test on iOS and Android without Native SDKs
- LiveReload for instant style and JS updates
️--> Install DevApp <--
> npm i
× Running command - failed!
[ERROR] An error occurred while running npm i (exit code 1):
> node-sass#4.7.2 install C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-64_binding.node":
HTTP error 404 Not Found
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
> uglifyjs-webpack-plugin#0.4.6 postinstall C:\Users\Tareque\Desktop\ionic
apps\app\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
> node-sass#4.7.2 postinstall C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass
> node scripts/build.js
Building: C:\Program Files\nodejs\node.exe C:\Users\Tareque\Desktop\ionic
apps\app\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 [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'C:\\Users\\Tareque\\Desktop\\ionic apps\\app\\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 info using node-gyp#3.6.2
gyp info using node#10.0.0 | 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
"C:\Users\Tareque\AppData\Local\Programs\Python\Python36-32\python.exe" in the PATH
gyp verb `which` succeeded C:\Users\Tareque\AppData\Local\Programs\Python\Python36-32\python.exe
C:\Users\Tareque\AppData\Local\Programs\Python\Python36-32\python.exe
gyp verb check python version `C:\Users\Tareque\AppData\Local\Programs\Python\Python36-32\python.exe -c "import
platform; print(platform.python_version());"` returned: "3.6.4\r\n"
gyp verb could not find "C:\Users\Tareque\AppData\Local\Programs\Python\Python36-32\python.exe". checking python
launcher
gyp verb check python launcher python executable found: "C:\\Python27\\python.exe"
gyp verb check python version `C:\Python27\python.exe -c "import platform; print(platform.python_version());"`
returned: "2.7.15\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: 10.0.0
gyp verb command install [ '10.0.0' ]
gyp verb install input version string "10.0.0"
gyp verb install installing version: 10.0.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: 10.0.0
gyp verb build dir attempting to create "build" dir: C:\Users\Tareque\Desktop\ionic
apps\app\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? C:\Users\Tareque\Desktop\ionic
apps\app\node_modules\node-sass\build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Users\Tareque\Desktop\ionic
apps\app\node_modules\node-sass\build\config.gypi
gyp verb config.gypi checking for gypi file: C:\Users\Tareque\Desktop\ionic
apps\app\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: C:\Users\Tareque\Desktop\ionic
apps\app\node_modules\node-sass\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\\Users\\Tareque\\Desktop\\ionic apps\\app\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=2013',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Tareque\\Desktop\\ionic
apps\\app\\node_modules\\node-sass\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Tareque\\Desktop\\ionic apps\\app\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Tareque\\.node-gyp\\10.0.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\Tareque\\.node-gyp\\10.0.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\Tareque\\Desktop\\ionic apps\\app\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\Tareque\\.node-gyp\\10.0.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\Tareque\\Desktop\\ionic apps\\app\\node_modules\\node-sass', gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\Tareque\\Desktop\\ionic apps\\app\\node_modules\\node-sass\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\Tareque\.node-gyp\10.0.0
gyp verb found first Solution file build/binding.sln
gyp verb could not find "msbuild.exe" in PATH - finding location in registry
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 5/8/2018 2:52:56 PM.
Project "C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\binding.sln" on node 1 (default
targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|x64".
Project "C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\binding.sln" (1) is building
"C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\binding.vcxproj.metaproj" (2) on node 1
(default targets).
Project "C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\binding.vcxproj.metaproj" (2) is
building "C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\src\libsass.vcxproj" (3) on node
1 (default targets).
C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\src\libsass.vcxproj(20,3): error MSB4019:
The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import>
declaration is correct, and that the file exists on disk.
Done Building Project "C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\src\libsass.vcxproj"
(default targets) -- FAILED.
Done Building Project "C:\Users\Tareque\Desktop\ionic
apps\app\node_modules\node-sass\build\binding.vcxproj.metaproj" (default targets) -- FAILED.
Done Building Project "C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\binding.sln"
(default targets) -- FAILED.
Build FAILED.
"C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\binding.sln" (default target) (1) ->
"C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\binding.vcxproj.metaproj" (default target)
(2) ->
"C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\src\libsass.vcxproj" (default target) (3)
->
C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass\build\src\libsass.vcxproj(20,3): error
MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the
<Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.63
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Tareque\Desktop\ionic
apps\app\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Tareque\\Desktop\\ionic
apps\\app\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags="
"--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Tareque\Desktop\ionic apps\app\node_modules\node-sass
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted
{"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
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\Tareque\AppData\Roaming\npm-cache\_logs\2018-05-08T08_52_57_968Z-debug.log
I have changed the environment variable many time after that errors start occurring. Then I install python and set the environment variable and installed visual studio to resolve windows build error . Now it is working fine..

Resources