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

>> Local Npm module "grunt-html-html-reporter" not found. Is it installed? #5

Open
womak24 opened this issue Oct 1, 2018 · 1 comment

Comments

@womak24
Copy link

womak24 commented Oct 1, 2018

Hello people,
I am using vnu with grunt-html and for writing HTML report I am using grunt-html-html-reporter. I have the following setup:

Gruntfile.js (initConfig)

    htmllint: {
      options: {
        errorlevels: ['error'], // For now we only look at errors.
        force: true,
        reporter: './node_modules/grunt-html-html-reporter', 
        reporterOutput: 'nu-report.html',
        // Stuff to ignore while validating
        ignore: ['Attribute “type” not allowed on element “i” at this point.']
      },
      all: {
        src: ['dist/xx/*.html', 'dist/xxx/templates/**/*.html'] 
      }
    }

And I load it with:

  require('load-grunt-tasks')(grunt);
  grunt.registerTask('nu', ['htmllint']); 

In my package.JSON I have the following:

  "devDependencies": {
    "crc32-stream": "^2.0.0",
    "graceful-fs": "^4.1.11",
    "grunt": "^1.0.3",
    "grunt-bootlint": "^0.10.2",
    "grunt-cli": "^1.2.0",
    "grunt-compile-handlebars": "^2.0.2",
    "grunt-contrib-clean": "^0.7.0",
    "grunt-contrib-compress": "^1.4.3",
    "grunt-contrib-connect": "^1.0.2",
    "grunt-contrib-copy": "^1.0.0",
    "grunt-contrib-uglify": "^2.0.0",
    "grunt-contrib-watch": "^1.1.0",
    "grunt-html": "^9.3.0",
    "grunt-html-html-reporter": "^3.1.0",
    "grunt-sass": "^2.0.0",
    "grunt-sass-lint": "^0.2.4",
    "icon-font-generator": "^1.1.1",
    "load-grunt-tasks": "^4.0.0"
  },
  "dependencies": {
    "bootstrap-sass": "^3.3.7",
    "casperjs": "^1.1.4",
    "sass-lint": "^1.12.1",
    "vnu-jar": "^18.8.29"
  }

I deleted my node_modeules folder and run npm install, but still when I run grunt nu I am getting the following error:

Local Npm module "grunt-html-html-reporter" not found. Is it installed?

But I get a HTML report in the end. I would love to understand what happens, cause it is so confusing with that error, which is actually not an error.

@prantlf
Copy link
Owner

prantlf commented May 27, 2022

You could try running grunt --verbose. If the NPM module loader prints the complete stack trace, it will point to the file, where the failure occurred.

Do you have the Gruntfile in a subdirectory? You could try '../node_modules/grunt-html-html-reporter'. But doesn't make sense, because you get the report generated.

The message "Local Npm module" sounds like coming from the load-grunt-tasks module. But a reporter is not a Grunt task. It has no directory tasks in the package. Confusing.

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

2 participants