角不能制作新项目

时间:2018-09-28 06:51:28

标签: node.js angular angular4-httpclient

我试图像这样使用AngularCLI创建新项目:

  

ng新的my-app-dream

结果是:

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning UNABLE_TO_VERIFY_LEAF_SIGNATURE: request to https://registry.npmjs.org/@angular-devkit%2fbuild-angular failed, reason: unable to verify the first certificate
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @angular/core@^6.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 'my-app-dream'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!    %appdata%\npm-cache\_logs\2018-09-28T06_46_24_071Z-debug.log
Package install failed, see above.

2 个答案:

答案 0 :(得分:0)

运行npm install -g @angular/cli

答案 1 :(得分:0)

您可以打开终端并进行

cat %appdata%\Roaming\npm-cache\_logs\2018-09-28T06_46_24_071Z-debug.log

然后发布结果?

由于抱怨它找不到与@ angular / core匹配的版本,所以也许您没有正确安装angular,也许您可​​以尝试使用以下命令重新安装angular CLI,然后重试。

npm install -g @angular/cli

希望它会有所帮助:)