Created 2024-12-01T17:16:35Z
Updated 2024-12-01T17:44:31Z
Type Information
Status Done

This is a sample day book entry

cannot find module '@octokit/core' Require stack: - /home/runner/work/_actions/actions/github-script/v6/dist/index.js
The error in the GitHub Actions job log indicates that the module @octokit/core could not be found. Here is the relevant part of the log:

Unhandled error: Error: Cannot find module '@octokit/core'
Require stack:
- /home/runner/work/_actions/actions/github-script/v6/dist/index.js
Steps to Fix the Error:

Ensure Dependency Installation: Make sure that the @octokit/core module is included in your package.json dependencies and is properly installed. You can add it by running:

npm install @octokit/core --save
Check Action Configuration: Ensure that the action is correctly set up to use the dependencies. You might need to add a setup-node step before running the script:

- name: Set up Node.js
  uses: actions/setup-node@v2
  with:
    node-version: '14'
- name: Install dependencies
  run: npm install
Update the github-script Action: Ensure you're using the correct version of the github-script action that includes the required dependencies. You might need to update the action version in your workflow file:

uses: actions/github-script@v6