Search code examples
github-actions

Github actions seems to case sensitive to files, can it be confirmed whether it is the case or not?


I am building a Webpack build action and I noticed that some javascript files were errored as follow: - Field 'browser' doesn't contain a valid alias configuration /home/runner/work/project/src/data/fetchingDataAsecond.js doesn't exist

The problem gets resolved if I rename javascript file fetchingDataAsecond to fetchingDataAsSecond.js ...! This seems weird a bit! Is there a literal check for grammar or file naming?

# .github/workflows/webpack.yml


name: NodeJS with Webpack

on:
  push:
    branches: [ "prod" ]
    

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [16.x]
    
    steps:
    - uses: actions/checkout@v3

    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v3
      with:
        node-version: ${{ matrix.node-version }}

    - name: Build
      run: |
        npm install
        npx webpack --config webpack.prod.js


Solution

  • The problem resolved by renaming all Javascript files with their instances with replacing grammatical errors, example:

    Error: verifyDataAday.js (camelcase)===> interpreted as {verify | Data | Aday} notice the last word 'Aday' which is grammatically an error

    Solution: verifyDataAsDay.js (camelcase)===> interpreted as {verify | Data | As | Day} here all words in the name of .js file are correct and will build on Github action with no issue!

    const verifyDataAsDay=()=>{ code...};