Skip to content

ENOENT running JS linter #48374

Description

@richardlau

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.

Activity

  1. Linkgoron commented on Jun 7, 2023

    @Linkgoron
    Contributor

    happens to me locally as well

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

  2. marco-ippolito commented on Jun 8, 2023

    @marco-ippolito
    Member

    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

  3. added
    toolsIssues and PRs related to the tools directory.
    on Jun 8, 2023
  4. richardlau commented on Jun 8, 2023

    @richardlau
    MemberAuthor
  5. added a commit that references this issue on Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolsIssues and PRs related to the tools directory.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions