You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devicemap.apache.org by Andrew Savory <as...@apache.org> on 2013/09/21 14:38:03 UTC

[BrowserMap] development / packaging with npm and grunt ... qunit problems

Hi,

I'm playing with BrowserMap and following README.md, specifically the part
on development. This says:
npm install -g grunt-cli
npm install -g jscoverage
grunt test

However, this doesn't work for me. I get:

grunt test
grunt-cli: The grunt command line interface. (v0.1.9)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started

After doing various incantations of "npm install grunt" or "npm install
grunt -g", I got to:

grunt test
>> Local Npm module "grunt-karma" not found. Is it installed?
>> Local Npm module "grunt-contrib-jshint" not found. Is it installed?
>> Local Npm module "grunt-contrib-uglify" not found. Is it installed?
>> Local Npm module "grunt-jsdoc" not found. Is it installed?
>> Local Npm module "grunt-contrib-clean" not found. Is it installed?
>> Local Npm module "grunt-contrib-copy" not found. Is it installed?
>> Local Npm module "grunt-contrib-compress" not found. Is it installed?
>> Local Npm module "grunt-qunit-cov" not found. Is it installed?
Warning: Task "jshint" not found. Use --force to continue.

Aborted due to warnings.

It seems the devDependencies from package.json didn''t get installed using
these instructions. Installing them manually (e.g. 'npm install grunt-karma
grunt-contrib-jshint ...') gets me to:

grunt test
>> Local Npm module "grunt-qunit-cov" not found. Is it installed?

Once I installed the default npm version, I get:

Running "jshint:files" (jshint) task
>> 5 files lint free.

Running "karma:continuous" (karma) task
WARN [config]: QUNIT is not supported anymore.
    Please use `frameworks = ["qunit"];` instead.
WARN [config]: QUNIT_ADAPTER is not supported anymore.
    Please use `frameworks = ["qunit"];` instead.
WARN [config]: LOG_INFO is not supported anymore.
  Please use `karma.LOG_INFO` instead.
ERROR [config]: Config file must export a function!
  module.exports = function(config) {
    config.set({
      // your config
    });
  };

I tried:
npm install --from-git git://github.com/raducotescu/grunt-qunit-cov.git

But this results in the same error.

It looks like src/test/karma.conf.js needs some updating. Can anyone with
more familiarity with grunt/npm offer any insights?


Thanks,

Andrew.
--
asavory@apache.org / contact@andrewsavory.com
http://www.andrewsavory.com/

Re: [BrowserMap] development / packaging with npm and grunt ... qunit problems

Posted by Werner Keil <we...@gmail.com>.
Node.js, which part of DeviceMap?

I participated in at least 2 Hackathons in Copenhagen on Node, happy to
have a look at it here or contribute.

Werner

On Sun, Sep 22, 2013 at 10:51 AM, Radu Cotescu <ra...@apache.org> wrote:

> Hi Andrew,
>
> The BrowserMap build works perfectly on my machine (Mac OS X 10.8.5),
> albeit I'm using Node.js 0.8.x (0.8.22 to be more precise). You don't need
> to pass -d to 'npm install'. It's good though that you've added that line
> to the README.md file. Other than that I wouldn't change anything else.
>
> Regards,
> Radu
>
> P.S.: Sorry for the late reply, I've been on PTO  this week and I avoided
> answering mail of any kind.
>
>
> On Sat, Sep 21, 2013 at 4:57 PM, Andrew Savory <as...@apache.org> wrote:
>
> > Hi,
> >
> > On 21 September 2013 13:38, Andrew Savory <as...@apache.org> wrote:
> >
> > Once I installed the default npm version, I get:
> > >
> > > Running "jshint:files" (jshint) task
> > > >> 5 files lint free.
> > >
> > > Running "karma:continuous" (karma) task
> > > WARN [config]: QUNIT is not supported anymore.
> > >     Please use `frameworks = ["qunit"];` instead.
> > > WARN [config]: QUNIT_ADAPTER is not supported anymore.
> > >     Please use `frameworks = ["qunit"];` instead.
> > > WARN [config]: LOG_INFO is not supported anymore.
> > >   Please use `karma.LOG_INFO` instead.
> > > ERROR [config]: Config file must export a function!
> > >   module.exports = function(config) {
> > >     config.set({
> > >       // your config
> > >     });
> > >   };
> > >
> > >
> > Ok, after some noodling I think things are now working mostly as they
> > should. I've updated karma.conf.js to what seems to be the current
> format.
> > See http://svn.apache.org/viewvc?view=revision&revision=1525237
> >
> > I was able to get the tests to work and the package to build, but I can't
> > seem to get it working with PhantomJS. Perhaps someone that knows more
> can
> > fix that part.
> >
> > It also seems like you need to run 'npm install -d' to get all
> dependencies
> > installed before you can test or package ... can anyone confirm?
> >
> >
> > Thanks,
> >
> > Andrew.
> > --
> > asavory@apache.org / contact@andrewsavory.com
> > http://www.andrewsavory.com/
> >
>

Re: [BrowserMap] development / packaging with npm and grunt ... qunit problems

Posted by Radu Cotescu <ra...@apache.org>.
Hi Andrew,

The BrowserMap build works perfectly on my machine (Mac OS X 10.8.5),
albeit I'm using Node.js 0.8.x (0.8.22 to be more precise). You don't need
to pass -d to 'npm install'. It's good though that you've added that line
to the README.md file. Other than that I wouldn't change anything else.

Regards,
Radu

P.S.: Sorry for the late reply, I've been on PTO  this week and I avoided
answering mail of any kind.


On Sat, Sep 21, 2013 at 4:57 PM, Andrew Savory <as...@apache.org> wrote:

> Hi,
>
> On 21 September 2013 13:38, Andrew Savory <as...@apache.org> wrote:
>
> Once I installed the default npm version, I get:
> >
> > Running "jshint:files" (jshint) task
> > >> 5 files lint free.
> >
> > Running "karma:continuous" (karma) task
> > WARN [config]: QUNIT is not supported anymore.
> >     Please use `frameworks = ["qunit"];` instead.
> > WARN [config]: QUNIT_ADAPTER is not supported anymore.
> >     Please use `frameworks = ["qunit"];` instead.
> > WARN [config]: LOG_INFO is not supported anymore.
> >   Please use `karma.LOG_INFO` instead.
> > ERROR [config]: Config file must export a function!
> >   module.exports = function(config) {
> >     config.set({
> >       // your config
> >     });
> >   };
> >
> >
> Ok, after some noodling I think things are now working mostly as they
> should. I've updated karma.conf.js to what seems to be the current format.
> See http://svn.apache.org/viewvc?view=revision&revision=1525237
>
> I was able to get the tests to work and the package to build, but I can't
> seem to get it working with PhantomJS. Perhaps someone that knows more can
> fix that part.
>
> It also seems like you need to run 'npm install -d' to get all dependencies
> installed before you can test or package ... can anyone confirm?
>
>
> Thanks,
>
> Andrew.
> --
> asavory@apache.org / contact@andrewsavory.com
> http://www.andrewsavory.com/
>

Re: [BrowserMap] development / packaging with npm and grunt ... qunit problems

Posted by Andrew Savory <as...@apache.org>.
Hi,

On 21 September 2013 13:38, Andrew Savory <as...@apache.org> wrote:

Once I installed the default npm version, I get:
>
> Running "jshint:files" (jshint) task
> >> 5 files lint free.
>
> Running "karma:continuous" (karma) task
> WARN [config]: QUNIT is not supported anymore.
>     Please use `frameworks = ["qunit"];` instead.
> WARN [config]: QUNIT_ADAPTER is not supported anymore.
>     Please use `frameworks = ["qunit"];` instead.
> WARN [config]: LOG_INFO is not supported anymore.
>   Please use `karma.LOG_INFO` instead.
> ERROR [config]: Config file must export a function!
>   module.exports = function(config) {
>     config.set({
>       // your config
>     });
>   };
>
>
Ok, after some noodling I think things are now working mostly as they
should. I've updated karma.conf.js to what seems to be the current format.
See http://svn.apache.org/viewvc?view=revision&revision=1525237

I was able to get the tests to work and the package to build, but I can't
seem to get it working with PhantomJS. Perhaps someone that knows more can
fix that part.

It also seems like you need to run 'npm install -d' to get all dependencies
installed before you can test or package ... can anyone confirm?


Thanks,

Andrew.
--
asavory@apache.org / contact@andrewsavory.com
http://www.andrewsavory.com/