今天我尝试创建一个新项目。所以我使用这个命令:
ng new NAME --style=less
并在我的cmder中弹出错误和警告。
所以我卸载了 Roaming/npm 和 npm-cache 中的节点和文件。然后我安装了node并再次下载cmder。然后我尝试安装 angular-cli 并再次发出警告和错误。当我尝试安装 webpack 或 git 时也是如此。
我在日志中看到此错误和警告:
1540 warn optional SKIPPING OPTIONAL DEPENDENCY: pinkie-promise@^2.0.0 (node_modules\@angular\cli\node_modules\read-pkg-up\node_modules\find-up\node_modules\pinkie-promise):
1541 warn 404 SKIPPING OPTIONAL DEPENDENCY: Not Found: pinkie-promise@^2.0.0
1542 warn optional SKIPPING OPTIONAL DEPENDENCY: pinkie-promise@^2.0.0 (node_modules\@angular\cli\node_modules\load-json-file\node_modules\pinkie-promise):
1543 warn 404 SKIPPING OPTIONAL DEPENDENCY: Not Found: pinkie-promise@^2.0.0
1551 error code ETARGET
1552 error notarget No matching version found for require-from-string@^1.1.0
1553 error notarget In most cases you or one of your dependencies are requesting
1553 error notarget a package version that doesn't exist.
1553 error notarget
1553 error notarget It was specified as a dependency of 'cosmiconfig'
1554 verbose exit [ 1, true ]
大约一年前,“leftpad”包破坏了世界各地的 NPM 构建,因为作者从公共存储库中提取了它。
今天,“小指承诺”也发生了同样的情况。作者的 NPM 帐户 (@floatdrop) 已被删除,这为他编写的所有软件包中的恶意软件提供了机会。
依赖构建包括 Ionic 和(在我的例子中)node-sass。
资源:
- NPM问题:https://github.com/npm/registry/issues/255 https://github.com/npm/registry/issues/255
- 事件报告:https://status.npmjs.org/incidents/41zfb8qpvrdj https://status.npmjs.org/incidents/41zfb8qpvrdj
- 小指承诺问题:https://github.com/floatdrop/pinkie-promise/issues/4 https://github.com/floatdrop/pinkie-promise/issues/4
- 依赖包:https://www.npmjs.com/browse/dependent/pinkie-promise https://www.npmjs.com/browse/depended/pinkie-promise
- @floatdrop 的所有存储库:https://github.com/floatdrop?tab=repositories https://github.com/floatdrop?tab=repositories
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)