【发布时间】:2021-11-20 10:45:15
【问题描述】:
最近我在一个 Vue.Js 应用程序中将我的节点版本从 10+ 升级到了 14+。但它给了我一些错误并要求安装包括 C++ 的 Visual Studio。当我用 C++ 安装 VS 时。它开始工作得很好。但在那之后,每当我执行新的“npm install”时,它都需要 C++。好像不太正常。 node和C++之间有什么关系。我觉得我缺少一些东西。如果有人知道解决方案,请告诉我...
我已经在下面提到了该应用在哪里使用 C++。
> node-zopfli-es@1.0.4 install G:\PROJECT_PATH\node_modules\node-zopfli-es
> node-gyp rebuild
G:\PROJECT_PATH\node_modules\node-zopfli-es>if not defined npm_config_node_gyp (node "C:\Users\pc\AppData\Roaming\nvm\v14.17.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\pc\AppData\Roaming\nvm\v14.17.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
zopfli-binding.cc
zopflipng.cc
zopflipng_lib.cc
lodepng.cpp
......
【问题讨论】:
-
有些模块是用C++编写的,需要编译C++编译器。
标签: node.js visual-studio vue.js npm node-gyp