安装程序包libxml时出现npm安装错误



我正在尝试使用命令安装程序包libxml

npm i libxml

不幸的是,我收到了以下错误,我真的不明白。

% npm i libxml                                                                                          
npm ERR! code 1
npm ERR! path /Users/smo/Documents/adep2/adep-export-tool-js/node_modules/libxml
npm ERR! command failed
npm ERR! command sh -c ./build.sh
npm ERR! ./build.sh: line 8: node-waf: command not found
npm ERR! ./build.sh: line 9: node-waf: command not found
npm ERR! cp: build/Release/o3.node: No such file or directory
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/smo/.npm/_logs/2021-06-14T12_12_32_467Z-debug.log

如果有人能至少向我解释一下这个错误,那将非常有帮助。

我解决了它。这是因为我使用了错误的节点版本。libxml包重用到节点版本14.x.x,而我的版本是16.3.0

最新更新