摩卡咖啡;在运行npm安装时检查依赖项
我想用Grunt运行一个Ionic应用程序(Yeoman Ionic) 为此,脚本运行摩卡咖啡;在运行npm安装时检查依赖项,npm,ionic-framework,mocha.js,bower,chai,Npm,Ionic Framework,Mocha.js,Bower,Chai,我想用Grunt运行一个Ionic应用程序(Yeoman Ionic) 为此,脚本运行npm install和bower install。然后运行grunt进行编译,然后在本地主机上运行grunt-service npm安装不会与Mocha和Chai产生对等依赖关系,而Mocha和Chai正在进行bower安装中止,如下所示: Running "karma:continuous" (karma) task Warning: Cannot find module 'mocha' Use --for
npm install
和bower install
。然后运行grunt
进行编译,然后在本地主机上运行grunt-service
npm安装
不会与Mocha和Chai产生对等依赖关系,而Mocha和Chai正在进行bower安装
中止,如下所示:
Running "karma:continuous" (karma) task
Warning: Cannot find module 'mocha' Use --force to continue.
Aborted due to warnings.
我运行了npm安装-g chai mocha
npm安装
npm WARN karma-mocha@0.1.10 requires a peer of mocha@* but none was installed.
npm WARN karma-chai@0.1.0 requires a peer of chai@* but none was installed.
即使这是一个警告,但在运行yo
时也会产生错误:
npm WARN karma-chai@0.1.0 requires a peer of chai@* but none was installed.
npm WARN karma-mocha@0.1.10 requires a peer of mocha@* but none was installed.
ERROR: Error: ENOENT: no such file or directory, rename '/Users/donjohnson/ionicNom/app/app/css' -> '/Users/donjohnson/ionicNom/app/app/styles'
ERROR: Error: ENOENT: no such file or directory, rename '/Users/donjohnson/ionicNom/app/app/js' -> '/Users/donjohnson/ionicNom/app/app/scripts'
ERROR: Error: ENOENT: no such file or directory, rename '/Users/donjohnson/ionicNom/app/app/img' -> '/Users/donjohnson/ionicNom/app/app/images'
这使得grunt serve可以打开一个没有任何内容的浏览器页面:(npm安装--将dev mocha chai保存到您的项目中(不带-g
)
从版本3开始,npm不会自动安装似乎在npm 3中,默认情况下不会安装依赖项,请使用此更新:
npm install chai@*
npm install mocha@*
然后使用:
npm install
bower install