我已经安装了phantomjs 1.9.7
wgetting zip,然后将其移至ubuntu virtualbox中的PATH。
在nodejs项目上,点火npm install -no-bin-links
正常,但grunt test
由于以下错误而失败,
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
,里面没有grunt-lib-phantomjs
东西node_modules
,
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
$ 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
是
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上引发了很多问题,但是没有一个对我有用。
npm install -g grunt-contrib-qunit
之前npm install --no-bin-links
似乎已经奏效。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句