Github Actions error on npm i

Hi there,

I have switched to Github Actions but I am having issues with Windows and I am not sure where to report it. Could you please point me to the right direction.

Anyway, here is the error (App exclusions to pause/resume Stretchly by hovancik · Pull Request #886 · hovancik/stretchly · GitHub):

C:\Users\runneradmin\AppData\Local\node-gyp\Cache\14.16.0\common.gypi not found

Here’s the whole log:

2021-04-01T11:52:47.4256001Z ##[section]Starting: Request a runner to run this job
2021-04-01T11:52:47.5472064Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'windows-latest'
2021-04-01T11:52:47.5472149Z Can't find any online and idle self-hosted runner in current repository's account/organization that matches the required labels: 'windows-latest'
2021-04-01T11:52:47.5472599Z Found online and idle hosted runner in current repository's account/organization that matches the required labels: 'windows-latest'
2021-04-01T11:52:47.6556467Z ##[section]Finishing: Request a runner to run this job
2021-04-01T11:52:56.0778134Z Current runner version: '2.277.1'
2021-04-01T11:52:56.1294542Z ##[group]Operating System
2021-04-01T11:52:56.1295861Z Microsoft Windows Server 2019
2021-04-01T11:52:56.1296408Z 10.0.17763
2021-04-01T11:52:56.1296892Z Datacenter
2021-04-01T11:52:56.1297574Z ##[endgroup]
2021-04-01T11:52:56.1298192Z ##[group]Virtual Environment
2021-04-01T11:52:56.1298800Z Environment: windows-2019
2021-04-01T11:52:56.1299349Z Version: 20210316.1
2021-04-01T11:52:56.1300667Z Included Software: https://github.com/actions/virtual-environments/blob/win19/20210316.1/images/win/Windows2019-Readme.md
2021-04-01T11:52:56.1302223Z Image Release: https://github.com/actions/virtual-environments/releases/tag/win19%2F20210316.1
2021-04-01T11:52:56.1303113Z ##[endgroup]
2021-04-01T11:52:56.1305643Z ##[group]GITHUB_TOKEN Permissions
2021-04-01T11:52:56.1307686Z Actions: write
2021-04-01T11:52:56.1308435Z Checks: write
2021-04-01T11:52:56.1308943Z Contents: write
2021-04-01T11:52:56.1309834Z Deployments: write
2021-04-01T11:52:56.1310960Z Issues: write
2021-04-01T11:52:56.1312523Z Metadata: read
2021-04-01T11:52:56.1313241Z OrganizationPackages: write
2021-04-01T11:52:56.1313880Z Packages: write
2021-04-01T11:52:56.1314394Z PullRequests: write
2021-04-01T11:52:56.1315232Z RepositoryProjects: write
2021-04-01T11:52:56.1316229Z SecurityEvents: write
2021-04-01T11:52:56.1316942Z Statuses: write
2021-04-01T11:52:56.1317677Z ##[endgroup]
2021-04-01T11:52:56.1321734Z Prepare workflow directory
2021-04-01T11:52:56.2651419Z Prepare all required actions
2021-04-01T11:52:56.2662834Z Getting action download info
2021-04-01T11:52:56.5770089Z Download action repository 'szenius/set-timezone@v1.0'
2021-04-01T11:52:58.9207485Z Download action repository 'actions/checkout@v2'
2021-04-01T11:52:59.9867833Z Download action repository 'actions/setup-node@v2'
2021-04-01T11:53:01.0126441Z Download action repository 'codecov/codecov-action@v1.1.0'
2021-04-01T11:53:02.4482195Z ##[group]Run szenius/set-timezone@v1.0
2021-04-01T11:53:02.4482982Z with:
2021-04-01T11:53:02.4483633Z   timezoneLinux: Europe/Amsterdam
2021-04-01T11:53:02.4484247Z   timezoneMacos: Europe/Amsterdam
2021-04-01T11:53:02.4484901Z   timezoneWindows: W. Europe Standard Time
2021-04-01T11:53:02.4485454Z ##[endgroup]
2021-04-01T11:53:03.4220246Z Configuring for platform win32
2021-04-01T11:53:04.6529680Z ##[group]Run actions/checkout@v2
2021-04-01T11:53:04.6530233Z with:
2021-04-01T11:53:04.6530790Z   repository: hovancik/stretchly
2021-04-01T11:53:04.6531651Z   token: ***
2021-04-01T11:53:04.6532019Z   ssh-strict: true
2021-04-01T11:53:04.6532506Z   persist-credentials: true
2021-04-01T11:53:04.6532983Z   clean: true
2021-04-01T11:53:04.6533349Z   fetch-depth: 1
2021-04-01T11:53:04.6533709Z   lfs: false
2021-04-01T11:53:04.6534086Z   submodules: false
2021-04-01T11:53:04.6534468Z ##[endgroup]
2021-04-01T11:53:40.6034110Z Syncing repository: hovancik/stretchly
2021-04-01T11:53:40.6396990Z ##[group]Getting Git version info
2021-04-01T11:53:40.6398720Z Working directory is 'D:\a\stretchly\stretchly'
2021-04-01T11:53:40.6813813Z [command]"C:\Program Files\Git\bin\git.exe" version
2021-04-01T11:53:40.7015127Z git version 2.30.2.windows.1
2021-04-01T11:53:40.7068197Z ##[endgroup]
2021-04-01T11:53:40.7074864Z Deleting the contents of 'D:\a\stretchly\stretchly'
2021-04-01T11:53:40.7079300Z ##[group]Initializing the repository
2021-04-01T11:53:40.7092090Z [command]"C:\Program Files\Git\bin\git.exe" init D:\a\stretchly\stretchly
2021-04-01T11:53:40.8698848Z Initialized empty Git repository in D:/a/stretchly/stretchly/.git/
2021-04-01T11:53:40.8759225Z [command]"C:\Program Files\Git\bin\git.exe" remote add origin https://github.com/hovancik/stretchly
2021-04-01T11:53:40.9514986Z ##[endgroup]
2021-04-01T11:53:40.9516114Z ##[group]Disabling automatic garbage collection
2021-04-01T11:53:40.9527803Z [command]"C:\Program Files\Git\bin\git.exe" config --local gc.auto 0
2021-04-01T11:53:41.0116274Z ##[endgroup]
2021-04-01T11:53:41.0120613Z ##[group]Setting up auth
2021-04-01T11:53:41.0137581Z [command]"C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp core\.sshCommand
2021-04-01T11:53:41.0380383Z [command]"C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2021-04-01T11:53:43.5818418Z [command]"C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2021-04-01T11:53:43.6059956Z [command]"C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2021-04-01T11:53:44.0912775Z [command]"C:\Program Files\Git\bin\git.exe" config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ***"
2021-04-01T11:53:44.1258480Z ##[endgroup]
2021-04-01T11:53:44.1260447Z ##[group]Fetching the repository
2021-04-01T11:53:44.1267332Z [command]"C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +b633a7e5c9856c9769dd0d4580837c394d451444:refs/remotes/pull/886/merge
2021-04-01T11:53:46.3251448Z remote: Enumerating objects: 236, done.        
2021-04-01T11:53:46.3321038Z remote: Counting objects: 100% (236/236), done.           
2021-04-01T11:53:46.3762653Z remote: Compressing objects: 100% (211/211)        
2021-04-01T11:53:46.3763245Z remote: Compressing objects: 100% (211/211), done.        
2021-04-01T11:53:46.5421600Z remote: Total 236 (delta 30), reused 134 (delta 23), pack-reused 0        
2021-04-01T11:53:46.5426326Z Receiving objects: 100% (236/236)
2021-04-01T11:53:46.5427174Z Receiving objects: 100% (236/236), 3.03 MiB | 27.22 MiB/s, done.
2021-04-01T11:53:46.5461895Z Resolving deltas:   0% (0/30)
2021-04-01T11:53:46.5477831Z Resolving deltas: 100% (30/30), done.
2021-04-01T11:53:46.7288685Z From https://github.com/hovancik/stretchly
2021-04-01T11:53:46.7291179Z  * [new ref]         b633a7e5c9856c9769dd0d4580837c394d451444 -> pull/886/merge
2021-04-01T11:53:46.7858452Z ##[endgroup]
2021-04-01T11:53:46.7859583Z ##[group]Determining the checkout info
2021-04-01T11:53:46.7863310Z ##[endgroup]
2021-04-01T11:53:46.7863945Z ##[group]Checking out the ref
2021-04-01T11:53:46.7886487Z [command]"C:\Program Files\Git\bin\git.exe" checkout --progress --force refs/remotes/pull/886/merge
2021-04-01T11:53:46.9691148Z Note: switching to 'refs/remotes/pull/886/merge'.
2021-04-01T11:53:46.9722158Z 
2021-04-01T11:53:46.9729731Z You are in 'detached HEAD' state. You can look around, make experimental
2021-04-01T11:53:46.9736289Z changes and commit them, and you can discard any commits you make in this
2021-04-01T11:53:46.9785685Z state without impacting any branches by switching back to a branch.
2021-04-01T11:53:46.9799438Z 
2021-04-01T11:53:46.9801076Z If you want to create a new branch to retain commits you create, you may
2021-04-01T11:53:46.9803271Z do so (now or later) by using -c with the switch command. Example:
2021-04-01T11:53:46.9818770Z 
2021-04-01T11:53:46.9834446Z   git switch -c <new-branch-name>
2021-04-01T11:53:46.9835194Z 
2021-04-01T11:53:46.9835755Z Or undo this operation with:
2021-04-01T11:53:46.9836259Z 
2021-04-01T11:53:46.9836723Z   git switch -
2021-04-01T11:53:46.9837106Z 
2021-04-01T11:53:46.9837893Z Turn off this advice by setting config variable advice.detachedHead to false
2021-04-01T11:53:46.9838533Z 
2021-04-01T11:53:46.9839513Z HEAD is now at b633a7e Merge 62d58bda3c0807d326399fdada00f8ce2840808e into 203974aa94bd96b59651b2cea973901b2376b1ab
2021-04-01T11:53:46.9841173Z ##[endgroup]
2021-04-01T11:53:47.0057756Z [command]"C:\Program Files\Git\bin\git.exe" log -1 --format='%H'
2021-04-01T11:53:47.0266031Z 'b633a7e5c9856c9769dd0d4580837c394d451444'
2021-04-01T11:53:47.0590713Z ##[group]Run actions/setup-node@v2
2021-04-01T11:53:47.0591262Z with:
2021-04-01T11:53:47.0591695Z   node-version: 14.16.0
2021-04-01T11:53:47.0592131Z   always-auth: false
2021-04-01T11:53:47.0592579Z   check-latest: false
2021-04-01T11:53:47.0593448Z   token: ***
2021-04-01T11:53:47.0593817Z ##[endgroup]
2021-04-01T11:53:47.8455476Z Found in cache @ C:\hostedtoolcache\windows\node\14.16.0\x64
2021-04-01T11:53:47.8753097Z ##[group]Run npm install npm -g
2021-04-01T11:53:47.8753675Z e[36;1mnpm install npm -ge[0m
2021-04-01T11:53:47.8910039Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2021-04-01T11:53:47.8910627Z ##[endgroup]
2021-04-01T11:54:21.1986727Z C:\npm\prefix\npm -> C:\npm\prefix\node_modules\npm\bin\npm-cli.js
2021-04-01T11:54:21.1988376Z C:\npm\prefix\npx -> C:\npm\prefix\node_modules\npm\bin\npx-cli.js
2021-04-01T11:54:21.2752689Z + npm@7.7.6
2021-04-01T11:54:21.2753593Z added 252 packages from 909 contributors in 18.883s
2021-04-01T11:54:21.7830831Z ##[group]Run npm install
2021-04-01T11:54:21.7831367Z e[36;1mnpm installe[0m
2021-04-01T11:54:21.7887119Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2021-04-01T11:54:21.7887667Z ##[endgroup]
2021-04-01T11:54:33.7900047Z npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
2021-04-01T11:55:06.9318691Z npm ERR! code 1
2021-04-01T11:55:06.9320639Z npm ERR! path D:\a\stretchly\stretchly\node_modules\macos-notification-state
2021-04-01T11:55:06.9322753Z npm ERR! command failed
2021-04-01T11:55:06.9324451Z npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
2021-04-01T11:55:06.9325981Z npm ERR! gyp info it worked if it ends with ok
2021-04-01T11:55:06.9327233Z npm ERR! gyp info using node-gyp@7.1.2
2021-04-01T11:55:06.9328616Z npm ERR! gyp info using node@14.16.0 | win32 | x64
2021-04-01T11:55:06.9330858Z npm ERR! gyp info find Python using Python version 3.7.9 found at "C:\hostedtoolcache\windows\Python\3.7.9\x64\python3.exe"
2021-04-01T11:55:06.9334030Z npm ERR! gyp http GET https://nodejs.org/download/release/v14.16.0/node-v14.16.0-headers.tar.gz
2021-04-01T11:55:06.9336597Z npm ERR! gyp http 200 https://nodejs.org/download/release/v14.16.0/node-v14.16.0-headers.tar.gz
2021-04-01T11:55:06.9338871Z npm ERR! gyp http GET https://nodejs.org/download/release/v14.16.0/SHASUMS256.txt
2021-04-01T11:55:06.9341084Z npm ERR! gyp http GET https://nodejs.org/download/release/v14.16.0/win-x86/node.lib
2021-04-01T11:55:06.9343309Z npm ERR! gyp http GET https://nodejs.org/download/release/v14.16.0/win-x64/node.lib
2021-04-01T11:55:06.9345477Z npm ERR! gyp http GET https://nodejs.org/download/release/v14.16.0/win-arm64/node.lib
2021-04-01T11:55:06.9347623Z npm ERR! gyp http 200 https://nodejs.org/download/release/v14.16.0/SHASUMS256.txt
2021-04-01T11:55:06.9349715Z npm ERR! gyp http 200 https://nodejs.org/download/release/v14.16.0/win-x86/node.lib
2021-04-01T11:55:06.9351868Z npm ERR! gyp http 404 https://nodejs.org/download/release/v14.16.0/win-arm64/node.lib
2021-04-01T11:55:06.9353918Z npm ERR! gyp http 200 https://nodejs.org/download/release/v14.16.0/win-x64/node.lib
2021-04-01T11:55:06.9355677Z npm ERR! gyp info find VS using VS2019 (16.9.31105.61) found at:
2021-04-01T11:55:06.9357376Z npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
2021-04-01T11:55:06.9359223Z npm ERR! gyp info find VS run with --verbose for detailed information
2021-04-01T11:55:06.9361051Z npm ERR! gyp info spawn C:\hostedtoolcache\windows\Python\3.7.9\x64\python3.exe
2021-04-01T11:55:06.9362696Z npm ERR! gyp info spawn args [
2021-04-01T11:55:06.9364564Z npm ERR! gyp info spawn args   'C:\\npm\\prefix\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
2021-04-01T11:55:06.9366264Z npm ERR! gyp info spawn args   'binding.gyp',
2021-04-01T11:55:06.9366988Z npm ERR! gyp info spawn args   '-f',
2021-04-01T11:55:06.9367527Z npm ERR! gyp info spawn args   'msvs',
2021-04-01T11:55:06.9368165Z npm ERR! gyp info spawn args   '-I',
2021-04-01T11:55:06.9369226Z npm ERR! gyp info spawn args   'D:\\a\\stretchly\\stretchly\\node_modules\\macos-notification-state\\build\\config.gypi',
2021-04-01T11:55:06.9370159Z npm ERR! gyp info spawn args   '-I',
2021-04-01T11:55:06.9371041Z npm ERR! gyp info spawn args   'C:\\npm\\prefix\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
2021-04-01T11:55:06.9371894Z npm ERR! gyp info spawn args   '-I',
2021-04-01T11:55:06.9373677Z npm ERR! gyp info spawn args   'C:\\Users\\runneradmin\\AppData\\Local\\node-gyp\\Cache\\14.16.0\\common.gypi',
2021-04-01T11:55:06.9374580Z npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
2021-04-01T11:55:06.9375290Z npm ERR! gyp info spawn args   '-Dvisibility=default',
2021-04-01T11:55:06.9376268Z npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\runneradmin\\AppData\\Local\\node-gyp\\Cache\\14.16.0',
2021-04-01T11:55:06.9378806Z npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\npm\\prefix\\node_modules\\npm\\node_modules\\node-gyp',
2021-04-01T11:55:06.9380262Z npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\runneradmin\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\14.16.0\\\\<(target_arch)\\\\node.lib',
2021-04-01T11:55:06.9381767Z npm ERR! gyp info spawn args   '-Dmodule_root_dir=D:\\a\\stretchly\\stretchly\\node_modules\\macos-notification-state',
2021-04-01T11:55:06.9382744Z npm ERR! gyp info spawn args   '-Dnode_engine=v8',
2021-04-01T11:55:06.9383389Z npm ERR! gyp info spawn args   '--depth=.',
2021-04-01T11:55:06.9384186Z npm ERR! gyp info spawn args   '--no-parallel',
2021-04-01T11:55:06.9384985Z npm ERR! gyp info spawn args   '--generator-output',
2021-04-01T11:55:06.9386154Z npm ERR! gyp info spawn args   'D:\\a\\stretchly\\stretchly\\node_modules\\macos-notification-state\\build',
2021-04-01T11:55:06.9387161Z npm ERR! gyp info spawn args   '-Goutput_dir=.'
2021-04-01T11:55:06.9387732Z npm ERR! gyp info spawn args ]
2021-04-01T11:55:06.9389553Z npm ERR! gyp: C:\Users\runneradmin\AppData\Local\node-gyp\Cache\14.16.0\common.gypi not found (cwd: D:\a\stretchly\stretchly\node_modules\macos-notification-state) while reading includes of binding.gyp while trying to load binding.gyp
2021-04-01T11:55:06.9390972Z npm ERR! gyp ERR! configure error 
2021-04-01T11:55:06.9391765Z npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
2021-04-01T11:55:06.9393042Z npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (C:\npm\prefix\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
2021-04-01T11:55:06.9394289Z npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
2021-04-01T11:55:06.9395456Z npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
2021-04-01T11:55:06.9396388Z npm ERR! gyp ERR! System Windows_NT 10.0.17763
2021-04-01T11:55:06.9397771Z npm ERR! gyp ERR! command "C:\\hostedtoolcache\\windows\\node\\14.16.0\\x64\\node.exe" "C:\\npm\\prefix\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
2021-04-01T11:55:06.9399217Z npm ERR! gyp ERR! cwd D:\a\stretchly\stretchly\node_modules\macos-notification-state
2021-04-01T11:55:06.9400078Z npm ERR! gyp ERR! node -v v14.16.0
2021-04-01T11:55:06.9400634Z npm ERR! gyp ERR! node-gyp -v v7.1.2
2021-04-01T11:55:06.9401166Z npm ERR! gyp ERR! not ok
2021-04-01T11:55:07.0722720Z 
2021-04-01T11:55:07.0728342Z npm ERR! A complete log of this run can be found in:
2021-04-01T11:55:07.0731485Z npm ERR!     C:\npm\cache\_logs\2021-04-01T11_55_06_934Z-debug.log
2021-04-01T11:55:07.2575835Z ##[error]Process completed with exit code 1.
2021-04-01T11:55:07.2859581Z Post job cleanup.
2021-04-01T11:55:11.9065205Z [command]"C:\Program Files\Git\bin\git.exe" version
2021-04-01T11:55:11.9268687Z git version 2.30.2.windows.1
2021-04-01T11:55:11.9343204Z [command]"C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp core\.sshCommand
2021-04-01T11:55:11.9586104Z [command]"C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2021-04-01T11:55:12.4334583Z [command]"C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2021-04-01T11:55:12.4522720Z http.https://github.com/.extraheader
2021-04-01T11:55:12.4573962Z [command]"C:\Program Files\Git\bin\git.exe" config --local --unset-all http.https://github.com/.extraheader
2021-04-01T11:55:12.4817490Z [command]"C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2021-04-01T11:55:12.9682257Z Cleaning up orphan processes

Looks like cache problem?

This seems to fail the most of the time (I would say 99% percent, I am seeing success once a few weeks). I am not seeing this elsewhere (appveyor or virtual machine)