Microsoft.cpp.default.props не найден при запуске установки npm

Есть много проблем, связанных с этой темой, однако я безрезультатно пробовал все следующие решения:

npm install -g --production windows-build-tools /*and*/ npm config set msvs_version 2015

установить Visual Studio Build Tools (8.1 и 10 SDK)

установите VCTargetsPath = "C: \ Program Files (x86) \ MSBuild \ Microsoft.Cpp \ v4.0 \ (v110, v120, v140)"

и почти любое другое интернет-решение. Моя ошибка:

PS C:\Users\hawki\idle-api> npm install

> [email protected] install C:\Users\hawki\idle-api\node_modules\synchronize\node_modules\fibers
> node build.js || nodejs build.js


C:\Users\hawki\idle-api\node_modules\synchronize\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Users\hawki\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )  else (node "C:\Users\hawki\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Users\hawki\idle-api\node_modules\synchronize\node_modules\fibers\build\fibers.vcxpr
oj(20,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft
.Cpp\v4.0\V110\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the
 <Import> declaration is correct, and that the file exists on disk.
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:\Users\hawki\AppData\Roaming\npm\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.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\hawki\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\Users\hawki\idle-api\node_modules\synchronize\node_modules\fibers
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\hawki\idle-api\node_modules\nodemon\node_modules\fsevents\node_modules'npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\nodemon\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\hawki\AppData\Roaming\npm-cache\_logs\2018-03-16T18_05_11_310Z-debug.log

Я запускаю это в Visual Studio Code, и я думаю, что проблема возникла после того, как я загрузил Visual Studio 2017. Я предполагаю, что ее следует решить в моем regedit, но я пробовал найденные здесь решения Почему MSBuild ищет в C: \ для Microsoft.Cpp.Default.props вместо c: \ Program Files (x86) \ MSBuild? (ошибка MSB4019), и похоже, что ничего не работает или даже не меняется исходная ошибка. Если бы кто-нибудь мог провести меня по шагам, чтобы исправить это, я был бы очень признателен

где Microsoft.Cpp.Defaults.props находится в вашем регионе? Не могли бы вы подтвердить, что путь C:\Program Files (x86)\MSBuild\Microsoft .Cpp\v4.0\V110 правильный? Если нет, установите переменную среды VCTargetsPath в папку, в которой установлен Microsoft.Cpp.Defaults.props.

Leo Liu-MSFT 19.03.2018 10:51
Настройка шаблона Metronic с помощью Webpack и Gulp
Настройка шаблона Metronic с помощью Webpack и Gulp
Я пишу эту статью, чтобы поделиться тем, как настроить макет Metronic с помощью Sass, поскольку Metronic предоставляет так много документации, и они...
3
1
5 527
0

Другие вопросы по теме