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

eslint-plugin-node missing as dev/peer dependency? #380

Closed
nickvergessen opened this issue Aug 9, 2022 · 2 comments
Closed

eslint-plugin-node missing as dev/peer dependency? #380

nickvergessen opened this issue Aug 9, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@nickvergessen
Copy link
Contributor

I was setting up a new app to use Vue

package.json

{
	"name": "files_retention",
	"version": "1.0.0",
	"author": "Joas Schilling <coding@schilljs.com>",
	"license": "agpl",
	"private": true,
	"scripts": {
		"build": "NODE_ENV=production webpack --progress",
		"dev": "NODE_ENV=development webpack --progress",
		"watch": "NODE_ENV=development webpack --progress --watch",
		"lint": "eslint --ext .js,.vue src",
		"lint:fix": "eslint --ext .js,.vue src --fix",
		"stylelint": "stylelint css/*.css css/*.scss src/**/*.scss src/**/*.vue",
		"stylelint:fix": "stylelint css/*.css css/*.scss src/**/*.scss src/**/*.vue --fix"
	},
	"dependencies": {
		"@nextcloud/auth": "^1.3.0",
		"@nextcloud/axios": "^1.10.0",
		"@nextcloud/dialogs": "^3.1.4",
		"@nextcloud/initial-state": "^1.2.1",
		"@nextcloud/router": "^2.0.0",
		"@nextcloud/vue": "^5.4.0",
		"vue": "^2.7.4",
		"vue-material-design-icons": "^5.1.2",
		"vuex": "^3.6.2"
	},
	"engines": {
		"node": "^16.0.0",
		"npm": "^7.0.0 || ^8.0.0"
	},
	"browserslist": [
		"extends @nextcloud/browserslist-config"
	],
	"devDependencies": {
		"@nextcloud/babel-config": "^1.0.0",
		"@nextcloud/browserslist-config": "^2.3.0",
		"@nextcloud/eslint-config": "^8.1.0",
		"@nextcloud/stylelint-config": "^2.1.2",
		"@nextcloud/webpack-vue-config": "^5.2.1"
	}
}

Follow up

  1. Run npm i
  2. Add .github/workflows/lint-eslint.yml from https://github.com/nextcloud/.github/blob/master/workflow-templates/lint-eslint.yml
  3. Push
  4. 🛑 Fails https://github.com/nextcloud/files_retention/runs/7740294422?check_suite_focus=true
Run npm run lint

> files_retention@1.0.0 lint
> eslint --ext .js,.vue src


Oops! Something went wrong! :(

ESLint: 8.21.0

ESLint couldn't find the plugin "eslint-plugin-node".

(The package "eslint-plugin-node" was not found when loaded as a Node module from the directory "/home/runner/work/files_retention/files_retention".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install eslint-plugin-node@latest --save-dev

The plugin "eslint-plugin-node" was referenced from the config file in ".eslintrc.js » @nextcloud/eslint-config".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

Error: Process completed with exit code 2.
  1. Run npm i eslint-plugin-node --save-dev
  2. Push again
  3. 🟢 Works https://github.com/nextcloud/files_retention/runs/7740454995?check_suite_focus=true
@nickvergessen nickvergessen added the bug Something isn't working label Aug 9, 2022
@skjnldsv
Copy link
Contributor

skjnldsv commented Aug 9, 2022

Fixed

@skjnldsv skjnldsv closed this as completed Aug 9, 2022
@nickvergessen
Copy link
Contributor Author

Ref #379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants