我正在尝试安装npm模块express-validator。它给出了其中一个依赖项的以下错误。有没有人知道如何修复它。
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'types/express' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'express-validator'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 3.19.0-59-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "express-validator"
npm ERR! cwd /home/abuzar/Desktop/node-basic/project
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! code E404
npm ERR! not ok code 0以下是节点版本和npm版本
发布于 2017-03-22 18:10:50
我也有同样的问题,并通过升级" nodejs“和"npm”到最新版本来解决它,你现在应该通过here安装nodejs版本6.x (对于我来说是v6.10.1)。
要升级"npm“,请使用以下命令:
npm install npm@latest -gnpm (4.4.1)是我现在使用的版本。
现在你应该能够安装像"express-validator“这样的包,或者其他出现同样错误的包。
https://stackoverflow.com/questions/41949573
复制相似问题