The simplest workaround its rename .npmrc before executes npm install and after install deps restore the original file, like the following approach:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# move .npmrc to not cause "Maximum call stack size exceeded" error when npm install executes
- run: |
mv -f .npmrc ./bak.npmrc
npm install; mv -f bak.npmrc .npmrc; ls -al
npm run build --if-present
npm run test