eslint-plugin-import: 1.10.1 breaks ESLint 2.13.1 and Node < 4
I work with Meteor which is just starting to adopt Node 4 (in Beta). We have many sample apps running Node 0.10.x.
I just downloaded the main Meteor todos app, ran “npm install” and got eslint-plugin-import 1.10.1 installed with ESLint 2.13.1. This produced the following error…
rhett@dreamshot:~/oob/meteors/todos1.3$ meteor npm run lint
> @ lint /home/rhett/oob/meteors/todos1.3
> eslint .
/home/rhett/oob/meteors/todos1.3/node_modules/eslint-plugin-import/lib/index.js:6
const rules = exports.rules = {
^^^^^
Oops! Something went wrong! :(
ESLint couldn't find the plugin "eslint-plugin-import". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-import is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
npm i eslint-plugin-import@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.
npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "node" "/home/rhett/.meteor/packages/meteor-tool/.1.3.0_3.139i3kk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm" "run" "lint"
npm ERR! node v0.10.43
npm ERR! npm v2.14.22
npm ERR! code ELIFECYCLE
npm ERR! @ lint: `eslint .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ lint script 'eslint .'.
npm ERR! This is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/rhett/oob/meteors/todos1.3/npm-debug.log
I’m no NPM expert, but do you perhaps need a node 4 requirement in your package.json now?
"engines": {
"node": ">=4"
}
Reverting to 1.10.0 fixed my problem. Also, running with Node 4 fixed it, but that isn’t something our user base at large is ready for yet.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 31 (27 by maintainers)
Commits related to this issue
- Fixed eslint-plugin-import version This dependancy version has been unreleased because of a bug introduced by the maintener https://github.com/benmosher/eslint-plugin-import/issues/415 — committed to geekuillaume/livestream-player by geekuillaume 8 years ago
- Bump version of eslint-plugin-import https://github.com/benmosher/eslint-plugin-import/issues/415 — committed to meteor/todos by tmeasday 8 years ago
Confirmed all good on 1.10.3! Thanks!!
Wow, my apologies if that was my ‘foreach’! I actually had the thought to double-check that because I caught myself doing it once (and then forgot to do so). But the coverage was seeming pretty good. It caught me in other errors many times over.
Anyway, thank you again!
Giving it a shot.
On Wed, Jul 6, 2016 at 2:00 PM, Ben Mosher notifications@github.com wrote: