找不到 require-from-string@^1.1.0 的匹配版本

No matching version found for require-from-string@^1.1.0

npm 项目的依赖项:

"dependencies": {
    "angular-chart.js": "1.1.0",
    "angular-cookies": "1.5.7",
    "angular-ui-bootstrap": "2.4.0",
    "angular-ui-grid": "4.0.5",
    "checklist-model": "0.10.0",
    "json-schema": "0.2.2"
  }

并且 npm install 停止工作并出现以下错误:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for require-from-string@^1.1.0
npm ERR! notarget In most cases you or 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 'cosmiconfig'
npm ERR! notarget 

如何解决?

npm 注册表有一个 open incident

事件详情:

Several packages including "require-from-string" are currently unavailable. We are aware of the issue and are working to restore the affected user and packages. Please do not attempt to republish packages, as this will hinder our progress in restoring them. Jan 6, 19:45 UTC

NPM 注册表有些问题,一些软件包已被删除。 他们正在恢复它...它很快就会可用

临时解决方案从已经 运行 projects/older 个项目

中获取包

for require-from-string 包可以在下面使用 link npm 安装 https://github.com/floatdrop/require-from-string/tarball/v1.1.0

ng 服务现在会导致问题 无法确定@angular/compiler-cli 和打字稿的版本。 最常见的原因是 npm 安装损坏。

请确保您的 package.json 包含 @angular/compiler-cli 和打字稿 devDependencies,然后删除 node_modules 和 package-lock.json (如果有的话)和 运行 npm 再次安装。