Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 爆米花没有注射到你的档案里_Javascript_Angularjs_Yeoman_Bower_Popcornjs - Fatal编程技术网

Javascript 爆米花没有注射到你的档案里

Javascript 爆米花没有注射到你的档案里,javascript,angularjs,yeoman,bower,popcornjs,Javascript,Angularjs,Yeoman,Bower,Popcornjs,在与grunt(grunt发球)合作时,我得到: Running "bower-install:app" (bower-install) task popcornjs was not injected in your file. Please go take a look in "app\bower_components\popcornjs" for the file you need, then manually include it in your file. 我已将Popcorn.js

在与grunt(grunt发球)合作时,我得到:

Running "bower-install:app" (bower-install) task

popcornjs was not injected in your file.
Please go take a look in "app\bower_components\popcornjs" for the file you need, then manually include it in your file.
我已将Popcorn.js添加到bower.json中:

{
    "name": "NAME",
    "version": "0.0.0",
    "dependencies": {
        "angular": "1.2.6",
        .
        "popcornjs": "~1.3.0",
        .
        "angular-slugify": "1.0.0"
    },
    "devDependencies": {
        "angular-mocks": "1.2.6",
        "angular-scenario": "1.2.6"
    }
}
至于my index.html:

<s_cript src="bower_components/popcornjs/popcorn.js"></script>
<s_cript src="bower_components/popcornjs/modules/player/popcorn.player.js"></script>
<s_cript src="bower_components/popcornjs/players/youtube/popcorn.youtube.js"></script>
<s_cript src="bower_components/popcornjs/plugins/code/popcorn.code.js"></script>

“.”


我是不是错过了什么?其他库工作正常。

我只是在
popcornjs
上快速搜索了一下。当你说“bower安装--save popcornjs”时,你得到的回购协议是。该repo有一个
bower.json
文件,该文件中有一个
main
属性。该属性告诉grunt bower安装要在HTML中插入的文件

但是,您使用的是版本
~1.3.0
,这将下拉此:。它没有
bower.json
,因此
grunt-bower安装
无法知道要包含什么文件


解决方案是手动将其包含在HTML中,或升级到正确使用Bower的较新版本。

是主爆米花文件吗?代码中不包含.@RUJordan popcorn.corn.js不在包中。@RUJordan我在直接从github下载的压缩球中也找不到popcorn.corn.js。