angular-phonecat 项目无法启动
来源:互联网 发布:windows共享文件夹密码 编辑:程序博客网 时间:2024/06/10 07:21
AngularJS教程: http://angularjs.cn/A00a
学习到第七章时:AngularJS入门教程07:路由与多视图
通过命令:git checkout -f step-7 下载了第七课后,在通过命令 npm start 启动项目时,抛出异常:
E:\workspaces\WebStorm workspaces\angular-phonecat>npm start> angular-phonecat@0.0.0 prestart E:\workspaces\WebStorm workspaces\angular-phonecat> npm install> angular-phonecat@0.0.0 postinstall E:\workspaces\WebStorm workspaces\angular-phonecat> bower installbower cached git://github.com/angular/bower-angular.git#1.2.17bower validate 1.2.17 against git://github.com/angular/bower-angular.git#=1.2.17bower cached git://github.com/angular/bower-angular-route.git#1.2.17bower validate 1.2.17 against git://github.com/angular/bower-angular-route.git#=1.2.17bower cached git://github.com/angular/bower-angular.git#1.2.20bower validate 1.2.20 against git://github.com/angular/bower-angular.git#1.2.20bower ECONFLICT Unable to find suitable version for angularnpm ERR! angular-phonecat@0.0.0 postinstall: `bower install`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the angular-phonecat@0.0.0 postinstall script.npm ERR! This is most likely a problem with the angular-phonecat package,npm ERR! not with npm itself.npm ERR! Tell the author that this fails on your system:npm ERR! bower installnpm ERR! You can get their info via:npm ERR! npm owner ls angular-phonecatnpm ERR! There is likely additional logging output above.npm ERR! System Windows_NT 6.1.7601npm ERR! command "D:\\Program Files (x86)\\nodejs\\\\node.exe" "D:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"npm ERR! cwd E:\workspaces\WebStorm workspaces\angular-phonecatnpm ERR! node -v v0.10.26npm ERR! npm -v 1.4.3npm ERR! code ELIFECYCLEnpm ERR!npm ERR! Additional logging details can be found in:npm ERR! E:\workspaces\WebStorm workspaces\angular-phonecat\npm-debug.lognpm ERR! not ok code 0npm ERR! angular-phonecat@0.0.0 prestart: `npm install`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the angular-phonecat@0.0.0 prestart script.npm ERR! This is most likely a problem with the angular-phonecat package,npm ERR! not with npm itself.npm ERR! Tell the author that this fails on your system:npm ERR! npm installnpm ERR! You can get their info via:npm ERR! npm owner ls angular-phonecatnpm ERR! There is likely additional logging output above.npm ERR! System Windows_NT 6.1.7601npm ERR! command "D:\\Program Files (x86)\\nodejs\\\\node.exe" "D:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"npm ERR! cwd E:\workspaces\WebStorm workspaces\angular-phonecatnpm ERR! node -v v0.10.26npm ERR! npm -v 1.4.3npm ERR! code ELIFECYCLEnpm ERR!npm ERR! Additional logging details can be found in:npm ERR! E:\workspaces\WebStorm workspaces\angular-phonecat\npm-debug.lognpm ERR! not ok code 0
提示 bower ECONFLICT Unable to find suitable version for angular
bower 没有找到合适的angular版本。
解决办法:
angular-phonecat 根目录下的 bower.json 文件
{ "name": "angular-seed", "description": "A starter project for AngularJS", "version": "0.0.0", "homepage": "https://github.com/angular/angular-seed", "license": "MIT", "private": true, "dependencies": { "angular": "1.2.x", "angular-mocks": "~1.2.x", "jquery": "1.10.2", "bootstrap": "~3.1.1", "angular-route": "~1.2.x" }}
把angular 的版本修改,写死为 “=1.2.20”
{ "name": "angular-seed", "description": "A starter project for AngularJS", "version": "0.0.0", "homepage": "https://github.com/angular/angular-seed", "license": "MIT", "private": true, "dependencies": { "angular": "=1.2.20", "angular-mocks": "~1.2.x", "jquery": "1.10.2", "bootstrap": "~3.1.1", "angular-route": "=1.2.20" }}
然后再用 npm start 命令启动,就能启动成功了。
E:\workspaces\WebStorm workspaces\angular-phonecat>npm start> angular-phonecat@0.0.0 prestart E:\workspaces\WebStorm workspaces\angular-phonecat> npm install> angular-phonecat@0.0.0 postinstall E:\workspaces\WebStorm workspaces\angular-phonecat> bower installbower not-cached git://github.com/angular/bower-angular-route.git#=1.2.20bower resolve git://github.com/angular/bower-angular-route.git#=1.2.20bower cached git://github.com/angular/bower-angular.git#1.2.20bower validate 1.2.20 against git://github.com/angular/bower-angular.git#1.2.20bower cached git://github.com/angular/bower-angular.git#1.2.20bower validate 1.2.20 against git://github.com/angular/bower-angular.git#=1.2.20bower download https://github.com/angular/bower-angular-route/archive/v1.2.20.tar.gzbower extract angular-route#=1.2.20 archive.tar.gzbower invalid-meta angular-route is missing "ignore" entry in bower.jsonbower resolved git://github.com/angular/bower-angular-route.git#1.2.20bower install angular#1.2.20bower install angular-route#1.2.20angular#1.2.20 app\bower_components\angularangular-route#1.2.20 app\bower_components\angular-route└── angular#1.2.20> angular-phonecat@0.0.0 start E:\workspaces\WebStorm workspaces\angular-phonecat> http-server -p 8000Starting up http-server, serving ./ on port: 8000Hit CTRL-C to stop the server
通过http://localhost:8000/app/index.html 访问,正常显示。
0 0
- angular-phonecat 项目无法启动
- Angular-PhoneCat 项目搭建,通过命令行运行
- 新手学习AngularJS最佳项目:angular-phonecat官方案例
- 1.angular-phonecat环境搭建
- AngularJS 官方案例:angular-phonecat
- angular-phonecat引导程序注意事项
- angular项目的启动流程
- vs2010无法启动项目。
- Spring项目无法启动
- java项目无法启动
- AngularJS初探:搭建PhoneCat项目的开发与测试环境
- AngularJS初探:搭建PhoneCat项目的开发与测试环境
- angular启动
- AngularJS--PhoneCat
- eclipse复制项目后无法部署、启动
- 启动android项目无法成功解决办法
- 启动android项目无法成功解决办法
- 无法以debug的方式,启动项目
- php curl判断一个远程文件在不在
- 杭电1878————欧拉回路基础题目
- 一个测试脚本,测试lvm
- Core Location和MapKit的一些简单使用
- cocos2dx3.2 异步加载和动态加载
- angular-phonecat 项目无法启动
- poppler 之介绍文章
- Linux常用命令行选项的含义
- zmq源码阅读 —— zmq_send()和zmq_recv()
- java中反射学习整理
- 51 talk immersion notes
- Android基础之——MacOSX下elipse开发环境的配置
- VC6.0快捷键说明
- STM32固件库详解