我已经安装了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 上引发了许多问题,但没有一个对我有用。