FirebaseExtended / FirebaseExtended/action-hosting-deploy

[QUESTION] How to add flags to 'npm i --omit dev --no-audit' for dynamic links

Open
#269 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
809
Forks
232
PR merge metrics
No merged PRs in 30d

Description

### The use case you're trying to solve

I've a next.js project which i'm trying to automatically build and deploy with this github action.
The project has a few dynamic routes so after compiling and building the static pages the github action prints:

```
Building a Cloud Function to run this application. This is needed due to:
• non-static route /crm/quadros/[id]
• non-static route /crm/quadros
• non-static route /entrar
• non-static route /perfil/formularios
```
and right after that fails
because some dependencies doesn't match the react version that is being used.

```
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.5.2" from react-to-pdf@0.0.14
npm ERR! node_modules/react-to-pdf
npm ERR! react-to-pdf@"^0.0.14" from the root project
```

```
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
```

this output is the result of the action running the code

```
[2023-03-10T01:38:59.487Z] Error: Command failed: npm i --omit dev --no-audit
at checkExecSyncError (node:child_process:826:11)
at execSync (node:child_process:900:15)
at prepareFrameworks (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/frameworks/index.js:372:42)
at async deploy (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/deploy/index.js:53:13)
```

how can i make the github action pass these flags for this call?

### Change to the action that would solve that use case

allow extra flags to be passed for the call
`npm i --omit dev --no-audit`

relative to the dynamic page generation

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.