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

ENOENT running JS linter #48374

Closed
richardlau opened this issue Jun 7, 2023 · 3 comments · Fixed by #48393
Closed

ENOENT running JS linter #48374

richardlau opened this issue Jun 7, 2023 · 3 comments · Fixed by #48393
Labels
tools Issues and PRs related to the tools directory.

Comments

@richardlau
Copy link
Member

Seeing this on both the Jenkins CI and GitHub Actions:
e.g. https://ci.nodejs.org/job/node-test-linter/50063/console (from yesterday's daily build)

08:00:20 + make lint-ci PYTHON=python3
08:00:20 Running JS linter...
08:00:21 Error: ENOENT: no such file or directory, open '/home/iojs/build/workspace/node-test-linter/package.json'
08:00:21     at Object.openSync (node:fs:590:3)
08:00:21     at readFileSync (node:fs:458:35)
08:00:21     at Object.<anonymous> (/home/iojs/build/workspace/node-test-linter/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/importsAsDependencies.js:19:24)
08:00:21     at Module._compile (node:internal/modules/cjs/loader:1196:14)
08:00:21     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
08:00:21     at Module.load (node:internal/modules/cjs/loader:1074:32)
08:00:21     at Function.Module._load (node:internal/modules/cjs/loader:909:12)
08:00:21     at Module.require (node:internal/modules/cjs/loader:1098:19)
08:00:21     at require (node:internal/modules/cjs/helpers:108:18)
08:00:21     at Object.<anonymous> (/home/iojs/build/workspace/node-test-linter/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/index.js:20:53) {
08:00:21   errno: -2,
08:00:21   syscall: 'open',
08:00:21   code: 'ENOENT',
08:00:21   path: '/home/iojs/build/workspace/node-test-linter/package.json'
08:00:21 }

#48328 looks like the culprit -- the "lint-js-and-md" workflow has the same error for 1b4ce69 but the error doesn't occur for e30e716 which is the preceding landed PR on main.

The error is not causing the CI to actually fail.

@Linkgoron
Copy link
Member

Linkgoron commented Jun 7, 2023

happens to me locally as well

as a workaround locally I added a file with an empty json called package.json to the root

@marco-ippolito
Copy link
Member

marco-ippolito commented Jun 8, 2023

I guess it works but it will print the error: gajus/eslint-plugin-jsdoc#1117, this was just added in the latest https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v46.2.6
I think it is possible to disable it gajus/eslint-plugin-jsdoc#1118

@marco-ippolito marco-ippolito added the tools Issues and PRs related to the tools directory. label Jun 8, 2023
@richardlau
Copy link
Member Author

Updating eslint-plugin-jsdoc appears to fix this.
https://github.com/nodejs/node/actions/runs/5214093758/jobs/9409925505?pr=48393#step:5:1

PR opened: #48393

nodejs-github-bot pushed a commit that referenced this issue Jun 9, 2023
Run a subset of `tools/dep_updaters/update-eslint.sh` to update
`eslint-plugin-jsdoc` to get rid of a spurious ENOENT error when
running the linter.

PR-URL: #48393
Fixes: #48374
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
RafaelGSS pushed a commit that referenced this issue Jul 3, 2023
Run a subset of `tools/dep_updaters/update-eslint.sh` to update
`eslint-plugin-jsdoc` to get rid of a spurious ENOENT error when
running the linter.

PR-URL: #48393
Fixes: #48374
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
Run a subset of `tools/dep_updaters/update-eslint.sh` to update
`eslint-plugin-jsdoc` to get rid of a spurious ENOENT error when
running the linter.

PR-URL: nodejs#48393
Fixes: nodejs#48374
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
Run a subset of `tools/dep_updaters/update-eslint.sh` to update
`eslint-plugin-jsdoc` to get rid of a spurious ENOENT error when
running the linter.

PR-URL: nodejs#48393
Fixes: nodejs#48374
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
ruyadorno pushed a commit that referenced this issue Aug 29, 2023
Run a subset of `tools/dep_updaters/update-eslint.sh` to update
`eslint-plugin-jsdoc` to get rid of a spurious ENOENT error when
running the linter.

PR-URL: #48393
Fixes: #48374
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
ruyadorno pushed a commit that referenced this issue Sep 1, 2023
Run a subset of `tools/dep_updaters/update-eslint.sh` to update
`eslint-plugin-jsdoc` to get rid of a spurious ENOENT error when
running the linter.

PR-URL: #48393
Fixes: #48374
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants