【发布时间】:2018-06-16 08:37:30
【问题描述】:
今天我尝试创建一个新项目。所以我使用这个命令:
ng new NAME --style=less
在我的cmder中弹出错误和警告。
所以我在 Roaming/npm 和 npm-cache 中卸载了我的节点和文件。然后我安装了节点并再次下载了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 ]
【问题讨论】: