首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到模块“grunt-lib-幻影in”中的“grunt-contrib”

找不到模块“grunt-lib-幻影in”中的“grunt-contrib”
EN

Stack Overflow用户
提问于 2014-05-27 19:39:50
回答 1查看 2.1K关注 0票数 2

我已经安装了phantomjs 1.9.7,然后将其移动到ubuntu中的路径。

在nodejs项目中,触发npm install -no-bin-links很好,但是grunt test失败了,出现了以下错误

代码语言:javascript
复制
root@ubuntu1204:/home/prayagupd/vboxshared/onlywallet# grunt test
Loading "qunit.js" tasks...ERROR
>> Error: Cannot find module 'grunt-lib-phantomjs'
Warning: Task "qunit" not found. Use --force to continue.

Aborted due to warnings.

在检查grunt-contrib-quint时,node_modules中没有grunt-lib-phantomjs

代码语言:javascript
复制
root@ubuntu1204:/home/prayagupd/vboxshared/onlywallet# ls -l node_modules/grunt-contrib-qunit/
total 36
-rwxrwx--- 1 root vboxsf  1076 Oct 14  2012 LICENSE-MIT
-rwxrwx--- 1 root vboxsf 10267 May 27 14:11 package.json
drwxrwx--- 1 root vboxsf  4096 Jun 22  2013 phantomjs
-rwxrwx--- 1 root vboxsf  8660 Jan 17 05:25 README.md
drwxrwx--- 1 root vboxsf  4096 Oct  1  2013 tasks


root@ubuntu1204:/home/prayagupd/vboxshared/onlywallet# ls -l node_modules/grunt-contrib-qunit/phantomjs/
total 4
-rwxrwx--- 1 root vboxsf 1574 Jun 22  2013 bridge.js

然而,在我的本地机器中,我得到了继grunt-lib-phantomjs之后的npm install

代码语言:javascript
复制
$ ls -l node_modules/grunt-contrib-qunit/node_modules/
total 4
drwxrwxr-x 5 prayagupd prayagupd 4096 May 27 22:00 grunt-lib-phantomjs

我的package.json是,

代码语言:javascript
复制
 1 {                                                                                                                                                 
  2   "name": "zazzercode",                                                                             
  3   "version": "0.13.1",                                                                              
  4   "devDependencies": {                                                                              
  5     "grunt": "~0.4.1",                                                                              
  6     "intern": "~1.2.1",                                                                             
  7     "grunt-contrib-jshint": "~0.8.0",                                                               
  8     "grunt-contrib-qunit": "~0.4.0",                                                                
  9     "grunt-contrib-watch": "~0.5.3",                                                                
 10     "grunt-contrib-uglify": "~0.3.2",                                                               
 11     "grunt-contrib-concat": "~0.3.0",                                                               
 12     "grunt-closure-compiler": "0.0.18"                                                              
 13   },                                                                                                
 14   "repository": {                                                                                   
 15     "type": "git",                                                                                  
 16     "url": "https://github.com/iPrayag/onlywallet"                                 
 17   }                                                                                                 
 18 }    

在github有很多问题,但是没有一个为我工作。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-05-27 22:30:09

npm install -g grunt-contrib-qunitnpm install --no-bin-links之前似乎起了作用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23897593

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档