question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error::Cannot read property 'startsWith' of undefined

See original GitHub issue

G’day:

I am testing this action locally with act like so:

act -j deployToFirebase -v

My stack:

  • macOS Catalina
  • node v14.3.0
  • yarn 1.22.5
  • act 0.2.14

I am running into a problem, and here’s the partial stack trace:

[Build and Deploy to Firebase/deployToFirebase] Exec command '[node /actions/dorny-paths-filter@v2/dist/index.js]'
[Build and Deploy to Firebase/deployToFirebase]   ❗  ::error::Cannot read property 'startsWith' of undefined
[Build and Deploy to Firebase/deployToFirebase]   ❌  Failure - dorny/paths-filter@v2
...
DEBU[0040] exit with `FAILURE`: 1
DEBU[0040] exit with `FAILURE`: 1
DEBU[0040] exit with `FAILURE`: 1
Error: exit with `FAILURE`: 1

My workflow file deployToFirebase.yml looks like:

name: Build and Deploy to Firebase

on:
  push:
    branches: [ develop ]

jobs:
  deployToFirebase:

    runs-on: ubuntu-latest
    env:
      CI: ""

    steps:
    - name: Check out code
      uses: actions/checkout@master
    - uses: dorny/paths-filter@v2
      id: filter
      with:
        filters: |
          frontend:
            - 'src/**'
          backend:
            - 'functions/**'

     # run only if 'frontend' (hosting) files were changed
    - name: frontend steps
      if: steps.filter.outputs.frontend == 'true'
      run: |
        echo "<<<<<<<<<<<<<<<<<<<<<<< frontend changed"
     # run only if 'backend' (functions) files were changed
    - name: functions steps
      if: steps.filter.outputs.backend == 'true'
      run: |
        echo ">>>>>>>>>>>>>>>>>>>>>>> functions changed"

What am I not doing right? Or is there anything special I have to do in order to use this action?

I am also open to suggestions on how else to test locally to save on the hassle of first sending the code to github and then waiting for the workflow result

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dornycommented, Oct 21, 2020

Image needs to be pulled just once. You can do it independently from act: docker pull nektos/act-environments-ubuntu:18.04. Image size shouldn’t affect container startup time, so once you have it locally only remaining issue is it will take 18GB from your disk drive.

Alternative would be to build your own custom image based on the act default image, but with git installed. If you decide for this solution, you should be sure it’s actually worth the effort 😃

Building custom image for act is quite out of scope of this project (and my knowledge) so if you will need some support the act repository is probably a better place.

0reactions
LamarrDcommented, Feb 17, 2021

Trying to do the same thing, it looks like the “medium” container now contains git but runs into a problem with github not being a part of the known hosts, PR Ref, Issue ref that they’re working on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'startsWith' of undefined
Hi, im trying to connect to MongoAtlas run an app that uses mongodb (^4.3.1 ) in nodejs (version 10.19.0), Windows 7 & then...
Read more >
TypeError: Cannot read property startsWith of undefined
props.description variable. The only way this error will appear is if it has no value. The reason everything works fine in your other...
Read more >
TypeError: Cannot read property 'startsWith' of undefined #324
I know there is a related error in #284, I decided to open a new issue as this hits us 100% of the...
Read more >
Cannot read property 'startsWith' of undefined - YouTube
Mongodb error solved - TypeError - Cannot read property 'startsWith' of undefined. 2.6K views 8 months ago JS - JavaScript.
Read more >
Vue3 Cannot read property 'startsWith' of undefined - Laracasts
Hi, I'm trying to setup laravel 8, vue 3, inertia, bootstrap 5. I was getting all sort of errors I figured somehow mainly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found