firebase / firebase/firebase-tools

Github Actions Deploy Succeds but process fails

Open
#3,691 2 comments 0 reactions 1 assignee Claimed by @jhuleatt View on GitHub
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### [REQUIRED] Environment info

**firebase-tools:** `FirebaseExtended/action-hosting-deploy@v0`

**Platform:**

Github Actions: windows-latest

### [REQUIRED] Test case

using github actions with a file like this:

https://github.com/AngelMunoz/SiteFi/blob/tunaxors-blog/.github/workflows/firebase-hosting-merge.yml

### [REQUIRED] Steps to reproduce
any commit/pull request will trigger the github action

### [REQUIRED] Expected behavior

The deploy runs fine and doesn't fail if the build doesn't

### [REQUIRED] Actual behavior
deploy runs fine but has an error at the end

Error: EPERM: operation not permitted, unlink 'C:\npm\cache\_npx\1056\node_modules\firebase-tools\node_modules\re2\build\Release\re2.node'

you can check all the logs here https://github.com/AngelMunoz/SiteFi/actions/workflows/firebase-hosting-merge.yml

The deployment actually performs completely fine but the process dies unexpectedly at the end marking the build as a failure
```
+ hosting[tunaxors-blog]: release complete

+ Deploy complete!

Project Console: https://console.firebase.google.com/project/tunaxors-blog/overview
Hosting URL: https://tunaxors-blog.web.app
[2021-08-19T15:03:29.621Z] Error: EPERM: operation not permitted, unlink 'C:\npm\cache\_npx\1056\node_modules\firebase-tools\node_modules\re2\build\Release\re2.node'
at Object.unlinkSync (fs.js:1251:3)
at fixWinEPERMSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:219:13)
at rimrafSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:319:28)
at C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:350:5
at Array.forEach ()
at rmkidsSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:349:26)
at rmdirSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:342:7)
at fixWinEPERMSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:217:5)
at rimrafSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:319:28)
at C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:350:5
at Array.forEach ()
at rmkidsSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:349:26)
at rmdirSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:342:7)
at fixWinEPERMSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:217:5)
at rimrafSync (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:319:28)
at C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:350:5

Error: An unexpected error has occurred.

The process 'C:\Program Files\nodejs\npx.cmd' failed with exit code 2
Error: The process 'C:\Program Files\nodejs\npx.cmd' failed with exit code 2
***
conclusion: 'failure',
output: ***
title: 'Deploy preview failed',
summary: "Error: The process 'C:\\Program Files\\nodejs\\npx.cmd' failed with exit code 2"
***
***
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.