【发布时间】:2020-05-19 04:52:05
【问题描述】:
我在 StackOverflow 中发现了一些带有标题标签 - ERROR:root:code for hash md5 was not found 的类似问题,但我无法将其与我在安装 npm 时所面临的问题联系起来。
我使用的是 macOS High Sierra (10.13.6)
带有节点版本v8.0.0 & npm v5.0.0
我在尝试将 Webpack 安装到我的项目中时收到以下错误消息。
npm install --save-dev webpack webpack-dev-server webpack-cli
> node-gyp rebuild
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
我尝试将我的 node 和 npm 版本分别切换到 v12.0.0 和 v6.9.0,但它遵循相同的错误。
有人知道吗?如何解决这个问题?我觉得它应该更像是一个配置,而不是一个特定的包安装。
提前感谢您的帮助!
附加信息:
我正在运行python version: 2.7.16
更新:
我刚刚观察到在我的系统中安装所有 npm 都会出现同样的错误。
遵循此question 和随之提供的解决方法,会在堆栈中引入不同的错误:
> node-gyp rebuild
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode_version, _ = XcodeVersion()
File"/Users/arunkramachandran/.nvm/versions/node/v8.0.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion
【问题讨论】:
-
@RaekhVoid 不。事实上,这给我的安装堆栈带来了额外的错误。我已经用新的错误消息更新了问题。你能看一下吗?
-
我有类似的问题,下面的链接解决了。 stackoverflow.com/questions/59269208/…
标签: javascript python node.js npm webpack