简体   繁体   English

安装Angular CLI创建Angular2项目时出错

[英]Getting error while installing Angular cli to create Angular2 project

I am trying to create the first Angular2 project, and did some installation process which are given below. 我正在尝试创建第一个Angular2项目,并做了下面的安装过程。

npm install -g angular-cli

ng new my-new-app

After running above command I am getting the following error. 运行上述命令后,出现以下错误。

2study/newapp/node_modules/.staging/selenium-webdriver-4a4eda8a/lib/test'
npm WARN tar ENOENT: no such file or directory, lstat '/opt/lampp/htdocs/angular2study/newapp/node_modules/.staging/selenium-webdriver-4a4eda8a/lib/test'
npm WARN tar ENOENT: no such file or directory, lstat '/opt/lampp/htdocs/angular2study/newapp/node_modules/.staging/selenium-webdriver-4a4eda8a/lib/test'
npm WARN tar ENOENT: no such file or directory, lstat '/opt/lampp/htdocs/angular2study/newapp/node_modules/.staging/selenium-webdriver-4a4eda8a/lib/test'
npm WARN tar ENOENT: no such file or directory, lstat '/opt/lampp/htdocs/angular2study/newapp/node_modules/.staging/selenium-webdriver-4a4eda8a/lib/test'
npm WARN tar ENOENT: no such file or directory, lstat '/opt/lampp/htdocs/angular2study/newapp/node_modules/.staging/selenium-webdriver-4a4eda8a/lib/firefox'
npm WARN tar ENOENT: no such file or directory, lstat '/opt/lampp/htdocs/angular2study/newapp/node_modules/.staging/selenium-webdriver-4a4eda8a/lib/firefox'
npm WARN tar ENOENT: no such file or directory, lstat '/opt/lampp/htdocs/angular2study/newapp/node_modules/.staging/selenium-webdriver-4a4eda8a/lib/firefox'
npm WARN tar ENOENT: no such file or directory, lstat '/opt/lampp/htdocs/angular2study/newapp/node_modules/.staging/selenium-webdriver-4a4eda8a/lib/firefox'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/subrajyoti/.npm/_logs/2018-01-13T06_57_18_354Z-debug.log

Package install failed, see above.

I need to fix this error. 我需要修复此错误。

看来您需要安装selenium-webdriver运行以下命令

npm install selenium-webdriver --save

尝试npm install selenium-webdriver然后使用

ng serve 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM