Skip to content
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

Fatal error: "name" and "value" are required for setHeader(). #12

Closed
davidshrive opened this issue Feb 16, 2015 · 12 comments
Closed

Fatal error: "name" and "value" are required for setHeader(). #12

davidshrive opened this issue Feb 16, 2015 · 12 comments

Comments

@davidshrive
Copy link

I'm getting the above error after attempting to set up this plugin. These are what my files look like...

Gruntfile.js

module.exports = function(grunt) {

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

        'link-checker': { 
            dev: {
                site: 'http://www.website.com',
                options: {
                    maxConcurrency: 20,
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-link-checker');

    grunt.registerTask('default', ['link-checker']);

};

package.json

{
  "name": "Website-Link-Crawler",
  "version": "0.0.1",
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-link-checker": "0.0.6"
  }
}
@ChrisWren
Copy link
Owner

Could you add the complete stack trace output from your terminal?

@itsjesseyo
Copy link

I have the same issue. that is the entire stack trace...

(mike)ITAdmins-iMac-2:grunt_test jgomez$ grunt
Running "link-checker:dev" (link-checker) task

Checking for broken links at: https://github.com/cgiffard/node-simplecrawler#configuring-the-crawler
Fatal error: "name" and "value" are required for setHeader().

@irishgordo
Copy link

I see the same thing

@ChrisWren
Copy link
Owner

Seems to be an issue in node 0.12 and io.js which is not present in node 0.10.

@ChrisWren
Copy link
Owner

node-simplecrawler isn't being tested on node 0.12 and io.js.

Fatal error: "name" and "value" are required for setHeader().
Error: "name" and "value" are required for setHeader().
    at ClientRequest.OutgoingMessage.setHeader (_http_outgoing.js:333:11)
    at new ClientRequest (_http_client.js:101:14)
    at Object.exports.request (http.js:49:10)
    at /Users/chriswren/code/grunt-link-checker/node_modules/simplecrawler/lib/crawler.js:768:11
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3

@XhmikosR
Copy link
Collaborator

Maybe a first step would be an upstream PR for this?

@ChrisWren
Copy link
Owner

That sounds good. I am not actively using this right now, so I am not going to jump in and fix it, but I will review PRs.

@XhmikosR
Copy link
Collaborator

I couldn't find why it fails, but I can at least submit a PR upstream to add node.js 0.12 in Travis.

@XhmikosR
Copy link
Collaborator

PR submitted simplecrawler/simplecrawler#119

Tests seem to pass there :/

@cgiffard
Copy link

I've fixed this upstream. Should (hopefully) be just a matter of updating the dependency. :)

@XhmikosR
Copy link
Collaborator

Awesome, I can confirm it's fixed now!

@ChrisWren
Copy link
Owner

Great, thanks for the patch @cgiffard!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants