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

RangeError: Maximum call stack size exceeded #882

Closed
satya1990 opened this issue May 11, 2017 · 12 comments
Closed

RangeError: Maximum call stack size exceeded #882

satya1990 opened this issue May 11, 2017 · 12 comments

Comments

@satya1990
Copy link

I was trying set up standard for mocha.
$standard --env mocha
I'm getting the following error logs on console.
Error:
standard: Unexpected linter output:
RangeError: Maximum call stack size exceeded
logs:
at Array.values (native)
at findVariable (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:141:42)
at findVariable (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:145:24)
at checkDestructuring (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:299:34)
at checkProperties (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:373:21)
at checkVariable (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:404:13)
at checkDestructuring (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:301:21)
at checkProperties (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:386:21)
at checkVariable (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:404:13)
at checkDestructuring (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:301:21)

@Sullux
Copy link

Sullux commented May 18, 2017

I'm getting the same thing:

RangeError: Maximum call stack size exceeded
    at findVariable (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:141:40)
    at findVariable (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:145:24)
    at checkDestructuring (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:299:34)
    at checkProperties (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:373:21)
    at checkVariable (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:404:13)
    at checkDestructuring (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:301:21)
    at checkProperties (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:373:21)
    at checkVariable (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:404:13)
    at checkDestructuring (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:301:21)
    at checkProperties (/usr/local/lib/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:373:21)

This is only happening on one project. Other projects on the same system seem to lint fine.

@landon9720
Copy link

Same thing here. npm install standard --global; standard ... RangeError etc.

@rajat1saxena
Copy link

Same here as well

@gingermusketeer
Copy link

I was saw this problem on a project I am working on as well with version 10.0.2 of standard on OSX 10.12.5. The error message was

standard: Unexpected linter output:

RangeError: Maximum call stack size exceeded
    at inspect (util.js:168:13)
    at exports.format (util.js:69:24)
    at Console.log (console.js:43:37)
    at findVariable (/project-folder/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:139:13)
    at findVariable (/project-folder/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:147:24)
    at checkDestructuring (/project-folder/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:302:34)
    at checkProperties (/project-folder/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:376:21)
    at checkVariable (/project-folder/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:407:13)
    at checkDestructuring (/project-folder/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:304:21)
    at checkProperties (/project-folder/node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:389:21)

After adding some debugging information to node_modules/standard/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js so that I could see the file that was being checked I discovered that I had a nested folder with node_modules in it that appeared to be being checked by eslint. The path was something like /project-folder/nested-folder/node_modules/babel-jest/build/index.js.

Not sure if this is the actual problem or if I was just lucky that removing this unneeded folder solved my issue.

@vramana
Copy link

vramana commented Jul 7, 2017

I see the same issue on npm repo reproduced via travis https://travis-ci.org/npm/npm/jobs/251196118

@luispabon
Copy link

luispabon commented Jul 18, 2017

Same here on Linux, npm 5.0.3, standard 10.0.2 and eslint-plugin-node 4.2.2

Happens on both node 7 and 8

@tunnckoCore
Copy link

tunnckoCore commented Jul 18, 2017

View: #933.

Search before post.

edit: huh, that issue is older, okey.

@tunnckoCore
Copy link

@vramana, @luispabon, @gingermusketeer i may help if post some files, or part of the files :)

@vramana
Copy link

vramana commented Jul 18, 2017

@tunnckoCore You can reproduce it with npm latest branch. The error triggers on Travis, so you can use Travis if you can't reproduce it on your machine.

@luispabon
Copy link

Okay, the empty project was somehow picking a file on the parent folder containing some dodgy code I reckon standard is looping through forever. I've managed to distill it all down to:

let fs = fs || require('fs')

Steps to reproduce:

  1. make a folder somewhere
  2. make a .js file containing the code above
  3. run npm install standard
  4. run node_modules/.bin/standard
  5. Profit!

It seems specific to the fs component though.

@ematipico ematipico marked this as a duplicate of #933 Jul 18, 2017
@tunnckoCore
Copy link

tunnckoCore commented Jul 19, 2017

Now we can close this, @ematipico, @feross :) v4.2.3 is released by @mysticatea! 🎉

@Flet
Copy link
Member

Flet commented Nov 7, 2017

Cool, if folks are having issues still, reinstall standard and it should pull the the fix down :)

@Flet Flet closed this as completed Nov 7, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

9 participants