npm install(Angular)的问题 [英] Problems with npm install (Angular)

查看:162
本文介绍了npm install(Angular)的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我尝试创建一个新项目。所以我使用这个命令:

  ng new NAME --style = less 

并在我的cmder弹出错误并警告。



所以我取消了我的节点和漫游文件/ npm和npm-cache。然后我安装节点并再次下载cmder。然后,我尝试安装angular-cli,并再次发出警告和错误。当我尝试安装webpack或git相同。



这个错误和警告我在日志中:

  1540警告可选SKIPPING OPTIONAL DEPENDENCY:pinkie-promise@^2.0.0(node_modules \ @ angular \cli\\\
ode_modules\read-pkg-up\\\
ode_modules\find-up\\\
ode_modules\pinkie-promise):

1541警告404 SKIPPING可选依赖:未找到:pinkie-promise@^2.0.0

1542警告可选SKIPPING可选依赖:pinkie-promise@^2.0.0( node_modules \ @ angular\cli\\\
ode_modules\load-json-file\\\
ode_modules\pinkie-promise):

1543警告404 SKIPPING OPTIONAL DEPENDENCY:Not Found:pinkie-promise @ ^ 2.0.0

1551错误代码ETARGET
1552错误notarget找不到匹配的版本for require-from-string@ ^1.1.0
1553错误notarget在大多数情况下,您或您的一个依赖项请求
1553错误,请注意不存在的软件包版本。
1553错误notarget
1553错误notarget它被指定为'cosmiconfig'的相关性
1554 verbose exit [1,true]
解决方案

在一年前,leftpad软件包打破了全世界的NPM版本,因为作者将其从公共存储库。

今天也是如此,因为小指承诺。作者的NPM帐户(@floatdrop)被删除,为他编写的所有软件包打开恶意软件的机会。



相关版本包括Ionic和(在我的情况下)node-sass。


Today i try creat a new project. So i use this command:

ng new NAME --style=less 

and in my cmder popped errors and warns.

So i unistall my node and files in Roaming/npm and npm-cache. Then I installed node and download again cmder. Then i try installed angular-cli and again warns and errors. When i try install webpack or git same.

This error and warn i have in logs:

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 ]

解决方案

A little under a year ago, the package "leftpad" broke NPM builds all over the world because the author pulled it from the public repository.

The same is happening today, for "pinkie-promise". The author's NPM account (@floatdrop) was deleted, opening opportunities for malware in all the packages he's written.

Dependent builds include Ionic and (in my case) node-sass.

Resources:

这篇关于npm install(Angular)的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆