question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm test from clean project yields eslint error

See original GitHub issue

did yo babel-boilerplate, answered questions, then did npm test. That, and all other npm run commands result in an error about eslint not knowing where to look for .globals.json:

Error: Cannot read config file: /Users/ixtli/Downloads/foo/node_modules/setup/.globals.json
Error: ENOENT: no such file or directory, open '/Users/ixtli/Downloads/foo/node_modules/setup/.globals.json'
Referenced from: /Users/ixtli/Downloads/foo/test/.eslintrc
    at Error (native)
    at Object.fs.openSync (fs.js:634:18)
    at Object.fs.readFileSync (fs.js:502:33)
    at readFile (/Users/ixtli/Downloads/foo/node_modules/eslint/lib/config/config-file.js:71:15)
    at loadJSONConfigFile (/Users/ixtli/Downloads/foo/node_modules/eslint/lib/config/config-file.js:121:41)
    at loadConfigFile (/Users/ixtli/Downloads/foo/node_modules/eslint/lib/config/config-file.js:213:26)
    at load (/Users/ixtli/Downloads/foo/node_modules/eslint/lib/config/config-file.js:500:18)
    at /Users/ixtli/Downloads/foo/node_modules/eslint/lib/config/config-file.js:392:36
    at Array.reduceRight (native)
    at applyExtends (/Users/ixtli/Downloads/foo/node_modules/eslint/lib/config/config-file.js:363:28)

That file exists where it should (./test/setup/) but it seems like .eslintrc is using a relative path which is being resolved to node_modules for some reason.

Tried on both node 6.2.2 and 4.2.2.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jamespleasecommented, Aug 25, 2016

Oh I’m sorry I missed the Jul 15th message 😦

No problem!

If I have reason to come back to this I will reopen. Thanks for your help 😄

Sounds good 😃

0reactions
ixtlicommented, Aug 25, 2016

Oh I’m sorry I missed the Jul 15th message 😦 If I have reason to come back to this I will reopen. Thanks for your help 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

'npm start' returns error: "There might be a problem with the ...
In my case, I solved my problem in this way. create a .env at the root of the folder react folder; type SKIP_PREFLIGHT_CHECK=true...
Read more >
eslint-plugin-n - npm
npm test runs tests and measures coverage. npm run coverage shows the coverage result of npm test command. npm run clean removes the...
Read more >
eslint-plugin-node/README.md at master - GitHub
A bug fix in a rule that results in it reporting fewer errors. Improvements to documentation. Non-user-facing changes such as refactoring code, adding,...
Read more >
How To Lint and Format Code with ESLint in Visual Studio Code
You can use a linter to do this. Linters check your code for syntax errors and highlight errors to make sure you can...
Read more >
Rules - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found