NPM 安装:找不到平台工具集 = v141
NPM install: Platform Toolset = v141 cannot be found
我正在尝试安装此库条形码扫描仪-npm,但安装失败并显示此错误:
C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140Microsoft.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:UsersblaDesktopblamyProjectnode_modules@serialportbin
dingsbuildbindings.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibbuild.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:UsersblaDesktopblamyProjectnode_modules@serialportbindings
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:UsersblaAppDataRoamingnpm-cache_logs2018-09-10T10_13_47_454Z-debug.log
我尝试了一些在网上找到的解决方案,例如安装这个:
npm i windows-build-tools
但它对我不起作用。
我安装了VS2017以及平台工具集v141,您可以在此处看到(最后一个复选框(:VS17更新程序
你能尝试以这种方式安装Windows构建工具吗
?npm install --global --production windows-build-tools
打开一个cmd.exe
,看看你的路径上是什么版本的MSBuild。如果有一个并且它是旧版本(就像我的情况一样(,请将其从路径中删除 - 至少在 npm 安装时 - 然后重试。
有关更多详细信息,请参阅此处的回答:https://stackoverflow.com/a/54300218/709537
相关文章:
- NPM 安装:找不到平台工具集 = v141
- 构建在VS 2013中找不到平台工具集= 'v141'
- C++ VS 工具集 141 - 142 铸造的差异
- 如果使用平台工具集构建应用,则 CCheckListBox 项在选择时会重叠'Visual Studio 2017 (v141)'
- Visual Studio Platform 工具集和运行时库
- 使用自定义工具集获取动态退出析构函数链接错误 - eh 矢量析构函数
- 在一个VS项目中使用多个工具集 - 是否存在风险
- 为什么在链接时搜索使用错误工具集的提升库?
- C2064 从 MSVC v100 更新到 v140 平台工具集时出现编译错误
- 使用类型参数专用化部分模板参数(VC++ v140 工具集)
- C V100平台工具集
- 提升链接器错误工具集
- 如何获取Visual Studio C++工具集标记
- 我已安装的GCC版本是我已安装的RedHat开发人员工具集的背后
- 找不到 Visual Studio 2008 的生成工具(平台工具集 = 'v90')
- 如何使用 CMake 设置 VS 平台工具集属性
- 始终使用 Visual Studio 中提供的最新工具集
- 使用不同工具集使用Cl.EXE编译
- 我可以将使用v120_xp工具集构建的静态库链接到使用VS2013中的v120工具集创建的EXE/DLL中吗
- 如何在C VS2012中转换或创建.NET V3.5解决方案(特别是工具集)