Skip to content

Cannot convert undefined or null to object #108

Open
@FJLopezGarcia

Description

@FJLopezGarcia

Hi team,
I have updated to jscs 3.0.2 and I have updated my gulp task to the following:

const gulp = require('gulp');
const jscs = require('gulp-jscs');
gulp.task('test:jscs', () => {
    return gulp.src(['app/src/**/!(*.min.*).js',
                'app/widgets/**/!(*.min.*).js',
                'app.module.js'])
        .pipe(jscs())
        .pipe(jscs.reporter());
});

Do you now the reason why i am having the following error: Cannot convert undefined or null to object

TypeError: Cannot convert undefined or null to object
    at Function.keys (native)
    at copyConfiguration (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp-jscs/node_modules/jscs/lib/config/configuration.js:1193:12)
    at NodeConfiguration.Configuration._processConfig (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp-jscs/node_modules/jscs/lib/config/configuration.js:474:5)
    at NodeConfiguration.Configuration.load (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp-jscs/node_modules/jscs/lib/config/configuration.js:238:10)
    at StringChecker.configure (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp-jscs/node_modules/jscs/lib/string-checker.js:67:29)
    at Checker.configure (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp-jscs/node_modules/jscs/lib/checker.js:28:39)
    at module.exports (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp-jscs/index.js:35:10)
    at Gulp.<anonymous> (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/gulpfile.js:154:15)
    at module.exports (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
    at Gulp.Orchestrator.start (/Users/franciscojlopez/Documents/GIT/DigitalIntModel_5228Git/Source/Web/Accenture.Dim.Web/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
    at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20
    at doNTCallback0 (node.js:407:9)
    at process._tickCallback (node.js:336:13)
    at Function.Module.runMain (module.js:477:11)

Here you are my package.json

"devDependencies": {
    "axe-webdriverjs": "^0.2.0",
    "glob": "^4.0.5",
    "gulp": "^3.9.1",
    "gulp-concat": "^2.3.3",
    "gulp-exec": "^2.1.2",
    "gulp-if": "^1.2.5",
    "gulp-ignore": "^2.0.1",
    "gulp-jscpd": "0.0.6",
    "gulp-jscs": "^3.0.2",
    "gulp-jscs-html-reporter": "^0.1.1",
    "gulp-jscs-stylish": "^1.4.0",
    "gulp-jscs-with-reporter": "^1.4.0",
    "gulp-jshint": "^2.0.0",
    "gulp-jshint-html-reporter": "^0.1.3",
    "gulp-jshint-xml-file-reporter": "^0.5.1",
    "gulp-load-plugins": "^0.7.0",
    "gulp-print": "^1.1.0",
    "gulp-protractor": "^2.1.0",
    "gulp-sonar": "^2.0.0",
    "gulp-task-listing": "^1.0.0",
    "gulp-uglify": "^1.5.3",
    "gulp-util": "^3.0.1",
    "gulp-webserver": "^0.9.1",
    "jasmine-expect": "^2.0.2",
    "jasmine-reporters": "^2.1.1",
    "jasmine-spec-reporter": "^2.4.0",
    "jshint": "^2.9.1",
    "jshint-stylish": "^1.0.0",
    "jshint-summary": "^0.4.0",
    "karma": "^0.13.11",
    "karma-chrome-launcher": "^0.2.2",
    "karma-coverage": "^0.5.5",
    "karma-firefox-launcher": "^0.1.7",
    "karma-htmlfile-reporter": "^0.2.2",
    "karma-ie-launcher": "^0.2.0",
    "karma-jasmine": "^0.3.6",
    "karma-jasmine-matchers": "^2.0.1",
    "karma-junit-reporter": "^0.3.7",
    "karma-phantomjs-launcher": "^1.0.0",
    "karma-safari-launcher": "^0.1.1",
    "karma-webdriver-launcher": "~0.2.0",
    "map-stream": "0.0.6",
    "mout": "^0.11.1",
    "mout-lang-type": "^0.6.0",
    "phantomjs": "^1.9.19",
    "phantomjs-prebuilt": "^2.1.3",
    "plato": "^1.2.0",
    "protractor": "^3.0.0",
    "protractor-accessibility-plugin": "^0.1.1",
    "protractor-console-plugin": "^0.1.1",
    "protractor-jasmine2-html-reporter": "0.0.5",
    "protractor-timeline-plugin": "^0.1.4",
    "wiredep": "^2.1.0",
    "yargs": "^1.3.3"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions