[英]Getting an “Invalid Version: 0.0.1alpha1” error when trying to install eslint
Trying to install eslint in recent versions of node (v5.5.0 or 5.9.0). 尝试在最新版本的节点(v5.5.0或5.9.0)中安装eslint。
Running npm install --save-dev eslint on node v5.9.0 (npm v3.7.3) gives me an error: 在节点v5.9.0(npm v3.7.3)上运行npm install --save-dev eslint会给我一个错误:
Invalid Version: 0.0.1alpha1
An ancient version of node (node v0.10.43, npm v1.4.29) installs it without a problem. 古老版本的节点(节点v0.10.43,npm v1.4.29)安装它没有问题。
Do you know what the problem might be and how to fix it? 你知道问题可能是什么以及如何解决它?
UPDATE: Just made sure that eslint loads on node v4.4.1 that is recommended on the Node site as an LTS release. 更新:确保在节点v4.4.1上加载eslint作为LTS版本在Node站点上推荐。 The npm version is 2.14.20.
npm版本是2.14.20。
The error occurred because one of the dependencies of eslint
must have used an invalid semver
spec. 发生错误是因为
eslint
某个依赖eslint
必须使用无效的semver
规范。 The version should have been 0.0.1-alpha1
for it to be valid. 该版本应为
0.0.1-alpha1
,以使其有效。
I've installed eslint
successfully using Node 5.9.0
and npm 3.7.3
so the module's version must have been updated. 我已经使用Node
5.9.0
和npm 3.7.3
成功安装了eslint
,因此必须更新模块的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.