Closed 1000miles closed 7 years ago
We seem to face a few breaking changes, probably related to eslint/eslint plugins and their recent release updates. To reproduce the same error as the last Travis build we installed the same npm (v3.8.6) and node (v5.12.0) versions and this our local error output:
# ➜ /vagrant git:(fix/npm-expect-immutable-error) ✗ npm run eslint
> wheelmap@1.0.0 eslint /vagrant
> eslint app/assets/javascripts
/vagrant/node_modules/eslint-config-blogfoster/node_modules/eslint-config-airbnb/rules/react-a11y.js:
Configuration for rule "jsx-a11y/anchor-has-content" is invalid:
Value "[object Object]" no (or more than one) schemas match.
Referenced from: eslint-config-airbnb
Referenced from: blogfoster/react
Referenced from: /vagrant/.eslintrc
Error: /vagrant/node_modules/eslint-config-blogfoster/node_modules/eslint-config-airbnb/rules/react-a11y.js:
Configuration for rule "jsx-a11y/anchor-has-content" is invalid:
Value "[object Object]" no (or more than one) schemas match.
Referenced from: eslint-config-airbnb
Referenced from: blogfoster/react
Referenced from: /vagrant/.eslintrc
at validateRuleOptions (/vagrant/node_modules/eslint/lib/config/config-validator.js:109:15)
at /vagrant/node_modules/eslint/lib/config/config-validator.js:156:13
at Array.forEach (native)
at Object.validate (/vagrant/node_modules/eslint/lib/config/config-validator.js:155:35)
at load (/vagrant/node_modules/eslint/lib/config/config-file.js:559:19)
at /vagrant/node_modules/eslint/lib/config/config-file.js:424:36
at Array.reduceRight (native)
at applyExtends (/vagrant/node_modules/eslint/lib/config/config-file.js:408:28)
at load (/vagrant/node_modules/eslint/lib/config/config-file.js:566:22)
at /vagrant/node_modules/eslint/lib/config/config-file.js:424:36
npm ERR! Linux 4.4.0-92-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "eslint"
npm ERR! node v5.12.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! wheelmap@1.0.0 eslint: `eslint app/assets/javascripts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wheelmap@1.0.0 eslint script 'eslint app/assets/javascripts'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the wheelmap package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint app/assets/javascripts
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs wheelmap
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls wheelmap
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /vagrant/npm-debug.log
According to our package.json
file we are currently using:
"devDependencies": {
"babel-jest": "^12.1.0",
"eslint": "^3.3.1",
"eslint-config-blogfoster": "^1.3.2",
"eslint-plugin-import": "^1.9.2",
"eslint-plugin-jsx-a11y": "^2.1.0",
...
}
Probably these packages need a revision and need to be pinned?
# ➜ /vagrant git:(fix/npm-expect-immutable-error) ✗ npm outdated
Package Current Wanted Latest Location
eslint 3.19.0 3.19.0 4.5.0 wheelmap
eslint-config-airbnb 14.1.0 14.1.0 15.1.0 wheelmap
eslint-plugin-import 1.16.0 1.16.0 2.7.0 wheelmap
eslint-plugin-jsx-a11y 2.2.3 2.2.3 6.0.2 wheelmap
...
@opyh Can you help here? :) cc @holgerd @anngreenberg
@emig can you help here?
That's a typical problem with the ESLint AirBnB configuration because the ESLint configuration format changed several times in the past.
It happens when the used AirBnB ESLint configuration is not compatible with the used ESLint config format version. To solve,
This should update ESLint/airbnb and solve the problem. It might be that this process creates new linter errors in the JS code that you have to fix afterwards.
Fixed with PR #650.
The script
'eslint app/assets/javascripts'
needs a revision. A couple of deprecated warnings and errors (e.g.Error: Cannot find module 'xyz'
) are happening at the moment.EXAMPLE:
After adding
which fixed the original issue mentioned here we now get following error:
Maybe related: