New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property '0' of null #1

Open
travispaul opened this Issue Jun 7, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@travispaul

travispaul commented Jun 7, 2013

Trying to run grunt-explainjs on node v0.10.10 and getting the error above.

Grunt output:

Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.

Registering "grunt-explainjs" local Npm module tasks.
Reading /home/travis/Development/explainjs-test/node_modules/grunt-explainjs/package.json...OK
Parsing /home/travis/Development/explainjs-test/node_modules/grunt-explainjs/package.json...OK
Loading "explainjs.js" tasks...OK
+ explainjs
Initializing config...OK
Loading "Gruntfile.js" tasks...OK
>> No tasks were registered or unregistered.

Running tasks: explainjs

Running "explainjs" task

Running "explainjs:dist" (explainjs) task
Verifying property explainjs.dist exists in config...OK
Files: src/js/jquery-1.10.1.js -> explain.html
Reading src/js/jquery-1.10.1.js...OK
Warning: Cannot read property '0' of null Use --force to continue.

Aborted due to warnings.

Gruntfile.js

module.exports = function(grunt) {

    "use strict";

    grunt.loadNpmTasks('grunt-explainjs');

    grunt.initConfig({
        explainjs: {
            dist: {
                options: {
                    showFilename: true
                },
                files: {
                    'explain.html': ['src/js/jquery-1.10.1.js']
                }
/*
                // Also tried this format
                files: [{
                    src: ['src/js/jquery-1.10.1.js'],
                    dest: 'explain.html'
                }]
*/
            }
        }
    });

};
@collinforrester

This comment has been minimized.

Show comment
Hide comment
@collinforrester

collinforrester Sep 12, 2013

Owner

Could you try 0.0.2 and see if it works any better for you? I'm testing on node 0.10.12

Owner

collinforrester commented Sep 12, 2013

Could you try 0.0.2 and see if it works any better for you? I'm testing on node 0.10.12

@shakyShane

This comment has been minimized.

Show comment
Hide comment
@shakyShane

shakyShane Oct 22, 2013

I'm on node 0.10.12 and also get the same error as above when using this config

        explainjs: {
            dist: {
                files: {
                    src: ['source.js'],
                    dest: 'explain.html'
                }
            }
        }

shakyShane commented Oct 22, 2013

I'm on node 0.10.12 and also get the same error as above when using this config

        explainjs: {
            dist: {
                files: {
                    src: ['source.js'],
                    dest: 'explain.html'
                }
            }
        }
@shakyShane

This comment has been minimized.

Show comment
Hide comment
@shakyShane

shakyShane Oct 22, 2013

It's to do with how you're testing for a dest on line 54.

shakyShane commented Oct 22, 2013

It's to do with how you're testing for a dest on line 54.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment