我正在尝试按照他们的文档安装nodegui,但似乎找不到Cmake,即使我已经安装了它(以及visual studio 2019 )。这是错误:
> cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile
[
'C:\\Program Files\\nodejs\\node.exe',
'C:\\Users\\giova\\Coding projects\\Node_Gui\\Tutorial_1\\nodegui-starter\\node_modules\\cmake-js\\bin\\cmake-js',
'compile'
]
ERR! OMG CMake is not installed. Install CMake.
ERR! OMG CMake is not installed. Install CMake.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/nodegui@0.36.0 build:addon: `cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/nodegui@0.36.0 build:addon script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\giova\AppData\Roaming\npm-cache\_logs\2021-10-15T06_47_38_675Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/nodegui@0.36.0 postinstall: `cross-env npm run setupqt && (node ./scripts/skip.js || npm run build:addon)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/nodegui@0.36.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! C:\Users\giova\AppData\Roaming\npm-cache\_logs\2021-10-15T06_47_39_666Z-debug.log发布于 2021-10-15 08:39:07
我想我通过向PATH环境变量添加C:\Program Files\CMake\bin解决了这个问题,就像下面这样:https://www.youtube.com/watch?v=8_X5Iq9niDE。我不能百分之百确定这是实际的解决方案,因为我之前尝试过随机的方法,但这可能是正确的方式。
https://stackoverflow.com/questions/69580922
复制相似问题