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

Node v4.0.0 support #256

Closed
edsadr opened this issue Sep 9, 2015 · 14 comments

Comments

@edsadr
Copy link

commented Sep 9, 2015

Right now experiencing errors using it with the new Node v4.0.0, it works fine with v0.10.40

standard: Unexpected linter output:

Error: Cannot find module 'eslint-config-standard-react'
Referenced from: /Users/edsadr/.nvm/versions/node/v4.0.0/lib/node_modules/standard/rc/.eslintrc
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at readConfigFromFile (/Users/edsadr/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:113:44)
    at loadConfig (/Users/edsadr/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:134:22)
    at /Users/edsadr/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:165:46
    at Array.reduceRight (native)
    at loadConfig (/Users/edsadr/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:149:36)
    at new Config (/Users/edsadr/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:374:38)

If you think this is a bug in `standard`, open an issue: https://github.com/feross/standard/issues
@julien-f

This comment has been minimized.

Copy link

commented Sep 10, 2015

Cannot reproduce, works perfectly with Node 4.0.0, npm 2.14.2 & standard 5.2.2.

@edsadr edsadr closed this Sep 10, 2015

@gunta

This comment has been minimized.

Copy link

commented Oct 27, 2015

Reproducing on Node 4.2.1, npm 3.3.6, standard 5.3.1

@gunta

This comment has been minimized.

Copy link

commented Oct 27, 2015

Cannot find module 'eslint-config-standard-react'
Referenced from: /ProjectName/node_modules/standard/rc/.eslintrc
  Error: Cannot find module 'eslint-config-standard-react'
  Referenced from: node_modules/standard/rc/.eslintrc
      at readConfigFromFile (node_modules/eslint/lib/config.js:155:44)
      at loadConfig (node_modules/eslint/lib/config.js:176:22)
      at node_modules/eslint/lib/config.js:207:46
      at Array.reduceRight (native)
      at loadConfig (node_modules/eslint/lib/config.js:191:36)
      at new Config (node_modules/eslint/lib/config.js:385:38)
      at CLIEngine.executeOnFiles (node_modules/eslint/lib/cli-engine.js:498:28)
      at node_modules/standard/node_modules/standard-engine/index.js:105:56
      at zalgoSafe (node_modules/standard/node_modules/standard-engine/node_modules/dezalgo/dezalgo.js:20:10)
      at node_modules/standard/node_modules/standard-engine/node_modules/deglob/index.js:64:12
      at end (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/run-parallel/index.js:16:15)
      at done (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/run-parallel/index.js:20:10)
      at each (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/run-parallel/index.js:26:7)
      at f (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/node_modules/once/once.js:17:25)
      at Glob.<anonymous> (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/glob.js:133:7)
      at Glob._finish (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/glob.js:172:8)
      at done (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/glob.js:159:12)
      at Glob._processGlobStar2 (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/glob.js:601:12)
      at node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/glob.js:590:10
      at RES (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/node_modules/inflight/inflight.js:23:14)
      at f (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/node_modules/once/once.js:17:25)
      at lstatcb_ (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/glob.js:491:7)
      at RES (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/node_modules/inflight/inflight.js:23:14)
      at f (node_modules/standard/node_modules/standard-engine/node_modules/deglob/node_modules/glob/node_modules/once/once.js:17:25)
      at FSReqWrap.oncomplete (fs.js:82:15)
@julien-f

This comment has been minimized.

Copy link

commented Oct 27, 2015

No problem using Node 4.2.1 and npm 3.3.8.

@watson

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

@gunta can you verify that the eslint-config-standard-react module is actually installed inside either the ./node_modules folder or in the ./node_modules/standard/node_modules folder?

Update: The above check folders only makes sense if standard is installed as a dependency to your project. If you have standard installed globally, you should check the node_modules folder inside the globally installed version of standard. That location depends on your setup.

@gunta

This comment has been minimized.

Copy link

commented Oct 28, 2015

Testing with npm 2.4.17 also.

eslint-config-standard-react is located in ./node_modules/standard/node_modules but not on ./node_modules.
So as soon as I try to install eslint-config-standard-react in ./node_modules it works.

I've noticed that this happens when running from mocha (either global or local), but not from standard.

@watson

This comment has been minimized.

Copy link
Member

commented Oct 28, 2015

@gunta it should be ok if it's installed in the ./node_modules/standard/node_modules folder - that's the expected location. It should fall back to ./node_modules if it doesn't find it there.

Which version of mocha are you using?

@gunta

This comment has been minimized.

Copy link

commented Oct 28, 2015

mocha 2.3.3

Yes, I know that it should fallback to ./node_modules.
That behaviour seems to have changed in npm 3 for peerDependencies but I'm testing with npm 2 and same results.
Not sure why its happening.

@watson

This comment has been minimized.

Copy link
Member

commented Oct 28, 2015

@gunta I just tried and couldn't replicate.

My setup is:

  • node v4.2.1
  • npm v2.14.7
  • mocha v2.3.3 (as devDependency)
  • standard v5.2.2 (as devDependency)

I ran the tests using npm test and my package.json scripts looks like this:

  "scripts": {
    "start": "node index.js",
    "test": "standard && NODE_ENV=test mocha --recursive"
  }
@pofider

This comment has been minimized.

Copy link

commented Nov 13, 2015

I see the same error...

$ node --version
v4.0.0
$ npm --version
2.14.2

https://travis-ci.org/jsreport/jsreport/jobs/90922098

@watson

This comment has been minimized.

Copy link
Member

commented Nov 13, 2015

@pofider thanks for linking to a Travis build - it makes debugging much easier 😃

According to the Travis log, eslint-config-standard-react did install correctly, so why it's not picking it up is really weird.

Is the error persistent?

@shinux

This comment has been minimized.

Copy link

commented Feb 1, 2016

same error here

@rstacruz

This comment has been minimized.

Copy link
Member

commented Feb 2, 2016

upgrade your npm (cc @shnode).

@zachlysobey

This comment has been minimized.

Copy link

commented Apr 19, 2016

I'm also experiencing this issue on

node 5.9.0
npm 3.7.3

Tried several rm -rfs of node_modules, and removing anything I thought might conflict, but no dice :(

@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.
8 participants
You can’t perform that action at this time.