Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Error: Cannot find module 'eslint' #54

Open
@sa9sha9

Description

@sa9sha9

I guess it's because this runner works on GITHUB_WORKSPACE only.

So it should have an option for setup working-directory.

my repo hierarchy

.
├── README.md
├── app/          // package.json is in.
└── .github/

ESLint plus echo

Run bradennapier/eslint-plus-action@v3
/usr/bin/docker run --name e102c9c1775b44d4bf538177857d02aa_903977 --label 179394 --workdir /github/workspace --rm -e INPUT_GITHUB-TOKEN -e INPUT_REPORTWARNINGS -e INPUT_REPORTWARNINGSASERRORS -e INPUT_REPORTIGNOREDFILES -e INPUT_REPORTSUGGESTIONS -e INPUT_ISSUESUMMARY -e INPUT_ISSUESUMMARYTYPE -e INPUT_ISSUESUMMARYMETHOD -e INPUT_ISSUESUMMARYONLYONEVENT -e INPUT_EXTENSIONS -e INPUT_INCLUDEGLOB -e INPUT_IGNOREGLOB -e INPUT_CONFIGFILE -e INPUT_RULEPATHS -e INPUT_ERRORONUNMATCHEDPATTERN -e INPUT_USEESLINTRC -e INPUT_USEESLINTIGNORE -e INPUT_FIX -e INPUT_NPMINSTALL -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/hoge/hoge":"/github/workspace" 179394:e102c9c1775b44d4bf538177857d02aa  "***" "false"
ENTRY
Install Yarn
[pushd] [/github/workspace] -> [/action]
Yarn Action Install
yarn install v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 17.77s.
[popd] [/action] -> [/github/workspace]
Execute From Directory: /github/workspace     // This line should be controllable 
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'eslint'
Require stack:
- /action/lib/eslint.js
- /action/lib/run.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/action/lib/eslint.js:5:18)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/action/lib/eslint.js', '/action/lib/run.js' ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions