安装Angular cli时出错以创建Angular2项目

时间:2018-01-13 07:33:06

标签: node.js angular npm

我正在尝试创建第一个Angular2项目,并做了一些安装过程,如下所示。

npm install -g angular-cli

ng new my-new-app

运行上述命令后,我收到以下错误。

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.

我需要修正此错误。

2 个答案:

答案 0 :(得分:0)

似乎你需要安装selenium-webdriver运行以下命令

npm install selenium-webdriver --save

答案 1 :(得分:0)

尝试npm install selenium-webdriver 然后使用

ng serve