Schroedinger-Hat / youtube-to-anchorfm

An automation process to convert YouTube video into audio file and uploading it to Anchor.fm podcast
MIT License
127 stars 70 forks source link

Error: Cannot find module '/github/workspace/index.js' #3

Closed dennislwm closed 3 years ago

dennislwm commented 3 years ago

Hi,

I've followed your instruction on "How to use it?"

(1) I created a file called episode.json and wrote my youtube id within it.

(2) I created a main.yml workflow

But I'm getting the error above during the job upload_episode.

#+-----------------------------------------------------------------------------------------+
#|                                M A I N   W O R K F L O W                                |
#+-----------------------------------------------------------------------------------------+
name: main
#+-----------------------------------------------------------------------------------------+
#|                            E X T E R N A L   T R I G G E R S                            |
#+-----------------------------------------------------------------------------------------+
on:
  push:
    paths:
      - episode.json
    branches: [master]
  #pull_request:
  #workflow_dispatch:
  schedule:
    - cron:  '1 0 * * *'
jobs:
  #+-----------------------------------------------------------------------------------------+
  #|                                 C U S T O M   J O B                                     |
  #+-----------------------------------------------------------------------------------------+
  docker_youtube_dl:
    #----------------------------------------
    # Type of runner that the job will run on
    runs-on: ubuntu-latest
    steps:
      #---------------------------------------------------------
      # Runs third-party actions
      #   Checks out your repository under $GITHUB_WORKSPACE
      - uses: actions/checkout@v2
      #------------------------------------
      # Runs third-party actions
      #   Upload episode from YouTube to Anchor.Fm
      - name: upload_episode
        uses: Schrodinger-Hat/youtube-to-anchorfm@v0.1.5
        env:
          ANCHOR_EMAIL: ${{ secrets.ANCHOR_EMAIL }}
          ANCHOR_PASSWORD: ${{ secrets.ANCHOR_PASSWORD }}
TheJoin95 commented 3 years ago

Can you show us your repository folder structures?

Wabri commented 3 years ago

I think this is the repository https://github.com/dennislwm/docker-youtube-dl

I manage to get your error:

Error: Cannot find module '/github/workspace/index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
TheJoin95 commented 3 years ago

Maybe you should add the *.js files in order to achieve the checkout from your repository and publish it on achor.fm. Maybe you deleted those files when you cloned the repo

dennislwm commented 3 years ago

Maybe my understanding of Github marketplace action is incorrect.

As I didn't fork or clone your repo, but merely used your action from marketplace.

So what you are suggesting is that I need to fork or clone your repo in order for the action to work. Is that correct?

Regards

TheJoin95 commented 3 years ago

So what you are suggesting is that I need to fork or clone your repo in order for the action to work. Is that correct?

Yes