我是前端开发的新手,现在我必须维护AngularJS应用程序。我正在尝试安装http-server
来测试我的应用程序,但是当我运行npm install http-server -g
命令时,出现以下错误:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for ecstatic@^3.0.0
npm ERR! notarget In most cases you ir one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'http-server'
npm ERR! notarget
我没有找到任何解决方案。你们以前看过这个错误吗?
答案 0 :(得分:12)
他们在4之前的版本中存在安全问题,并删除了它们的下载链接。您可以在这里找到更多详细信息:https://github.com/jfhbrook/node-ecstatic/issues/255。
您要么需要以前的缓存版本,要么移动到新版本。
答案 1 :(得分:7)
他们正在努力解决。 这是NPM的一个分支:
npm i http-server-legacy
或
yarn install http-server-legacy
来源:https://github.com/indexzero/http-server/issues/521#issuecomment-488843797
答案 2 :(得分:3)