xgqfrms / learning

learning : A collection of all kinds of resources, videos, pdf, blogs, codes... 📚 + 💻 + ❤
https://learning.xgqfrms.xyz
MIT License
16 stars 12 forks source link

Node.js & MSBUILD #44

Open xgqfrms opened 5 years ago

xgqfrms commented 5 years ago

Node.js & MSBUILD


Q:

MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0".

# Operating System: Windows 10 Pro 64-bit (10.0, Build 17134) (17134.rs4_release.180410-1804)
$ npm i

image

A:

$ npm -h
$ npm help config 
$ npm config list
$ npm config ls -l

OK

???

Error

## not work at all???
$ npm config set msvs_version 2017

image

## ???
$ npm install --global --production windows-build-tools
$ npm config set msvs_version 2012 --global
# ???
$ npm config set msvs_version 2012
xgqfrms commented 5 years ago

https://github.com/chjj/pty.js/issues/60#issuecomment-492556629 https://stackoverflow.com/questions/14278417/cannot-install-node-modules-that-require-compilation-on-windows-7-x64-vs2012/22411007#22411007

https://stackoverflow.com/questions/24182686/node-npm-error-on-windows-looking-for-tools-version


https://www.npmjs.com/package/windows-build-tools

xgqfrms commented 5 years ago

file:///H:/Program%20Files/nodejs/node_modules/npm/html/doc/cli/npm-config.html

$ npm config list -l

$ npm config list --json
xgqfrms commented 5 years ago

"msvs_version": "2012",

xgqfrms commented 5 years ago
$ npm install --global --production windows-build-tools

image

OK

image

xgqfrms commented 5 years ago

https://www.google.com/search?ei=GtPbXN3_Fc2UmAWE3LHICw&q=.net+framework+3.5+download+windows+10&oq=.net+framework+3.5+downaload&gs_l=psy-ab.1.2.0i13l10.73477.75797..79085...0.0..0.546.1833.1j9j5-1......0....1..gws-wiz.......0.6kbdUssPLkE

Microsoft .NET Framework 3.5 Service Pack 1

https://www.microsoft.com/en-us/download/details.aspx?id=22


$ npm install -g node-gyp

https://tips.tutorialhorizon.com/2018/03/14/msbuild-error-msb4132-the-tools-version-2-0-is-unrecognized-available-tools-versions-are-4-0/

xgqfrms commented 5 years ago

image

xgqfrms commented 5 years ago

The imported project "D:\Micros oft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.\

image

xgqfrms commented 5 years ago

https://github.com/nodejs/node-gyp/issues/671

https://github.com/nodejs/node-gyp/issues/671#issuecomment-176186550

# cd C:

$ npm install -g node-gyp
xgqfrms commented 5 years ago
$ SET VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120

http://landcareweb.com/questions/3491/wei-shi-yao-msbuildzai-c-zhong-cha-zhao-microsoft-cpp-default-propser-bu-shi-c-program-files-x86-msbuild-cuo-wu-msb4019

xgqfrms commented 5 years ago

node-sass xgqfrms bug

https://github.com/sass/node-sass/issues/1579#issuecomment-393040359

$ npm rebuild node-sass

https://github.com/sass/node-sass/issues/1918#issuecomment-284570068

xgqfrms commented 5 years ago

https://www.cnblogs.com/xgqfrms/p/10554424.html

xgqfrms commented 1 year ago

.env file & Node.js v20.x.x

https://www.cnblogs.com/xgqfrms/p/17693872.html