Coder Social home page Coder Social logo

error on run about gulp-jscs HOT 10 CLOSED

jscs-dev avatar jscs-dev commented on May 29, 2024
error on run

from gulp-jscs.

Comments (10)

Thomasdezeeuw avatar Thomasdezeeuw commented on May 29, 2024

I got the same error on version 0.4.0, goes wrong here: https://github.com/mdevils/node-jscs/blob/master/lib/checker.js#L27. Haven't looked into it any further.

from gulp-jscs.

iamstarkov avatar iamstarkov commented on May 29, 2024

I thought it is my fault from #14 pull-request, in which I wanted to update jscs depency and I followed @deepak1556's advice here #14 (comment) and I think that all (except tests) went bad after this.

from gulp-jscs.

Thomasdezeeuw avatar Thomasdezeeuw commented on May 29, 2024

I think in file: https://github.com/sindresorhus/gulp-jscs/blob/master/index.js#L13

checker.configure(config ? require(config) : configFile.load('.jscsrc', process.cwd()));
Should be:
checker.configure(configFile.load(config || '.jscsrc', process.cwd()));

from gulp-jscs.

deepak1556 avatar deepak1556 commented on May 29, 2024

What @Thomasdezeeuw suggested shld actually be enough as cli-config.js does the path resolving based on the directory provided or defaults to process.cwd() https://github.com/mdevils/node-jscs/blob/master/lib/cli-config.js#L19. So even better checker.configure(configFile.load(config || '.jscsrc'))

from gulp-jscs.

iamstarkov avatar iamstarkov commented on May 29, 2024

I tried checker.configure(configFile.load(config || '.jscsrc', process.cwd())); and checker.configure(configFile.load(config || '.jscsrc')) and no one works for me with the same error:

/Users/vstarkov/projects/box/node_modules/gulp/node_modules/orchestrator/index.js:153
                        throw err;

from gulp-jscs.

dstroot avatar dstroot commented on May 29, 2024

Same problem here...

from gulp-jscs.

joeybaker avatar joeybaker commented on May 29, 2024

FYI: this is caused by an breaking change in the update version of jscs. The default file name used to be .jscs.json. It's now .jscsrc. Change your file name, and you'll be all set.

from gulp-jscs.

iamstarkov avatar iamstarkov commented on May 29, 2024

The default file name used to be .jscs.json. It's now .jscsrc. Change your file name, and you'll be all set.

I changed it in my #14 pull-request and shit happens

from gulp-jscs.

iamstarkov avatar iamstarkov commented on May 29, 2024

thank you

from gulp-jscs.

iamstarkov avatar iamstarkov commented on May 29, 2024

If anybody still get this error like this:

vstarkov@vstarkov-osx nodeChan(master)$ gulp jscs
[gulp] Using gulpfile /Users/vstarkov/projects/nodeChan/gulpfile.js
[gulp] Starting 'jscs'...
[gulp] 'jscs' errored after 45 ms Unexpected token }

/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/index.js:153
                        throw err;
                              ^
SyntaxError: Unexpected token }
    at Object.parse (native)
    at Object.exports.getContent (/Users/vstarkov/projects/nodeChan/node_modules/gulp-jscs/node_modules/jscs/lib/cli-config.js:55:28)
    at Object.exports.load (/Users/vstarkov/projects/nodeChan/node_modules/gulp-jscs/node_modules/jscs/lib/cli-config.js:83:20)
    at module.exports (/Users/vstarkov/projects/nodeChan/node_modules/gulp-jscs/index.js:13:35)
    at Gulp.getType (/Users/vstarkov/projects/nodeChan/gulpfile.js:28:11)
    at module.exports (/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:31:7)
    at Gulp.Orchestrator._runTask (/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
    at Gulp.Orchestrator.start (/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
    at /usr/local/lib/node_modules/gulp/bin/gulp.js:77:20

it is because of 77 line in gulp.js, you can fix this error by installing latest gulp globally and locally.

@sindresorhus maybe this should be noted in README?

from gulp-jscs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.