Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github actions - npm install flags #1102

Closed
Multinite opened this issue Jan 5, 2024 · 3 comments
Closed

Github actions - npm install flags #1102

Multinite opened this issue Jan 5, 2024 · 3 comments
Labels
type: feature feature request

Comments

@Multinite
Copy link

Multinite commented Jan 5, 2024

What would you like?

Currently, within my project, to install packages, I must include the --force flag to ensure NPM installs despite some of my dependencies having version compatibility issues. By adding a new key within the cypress step called install_flags, you could allow users to enter any flags to go along with the npm install.

Example:

      - name: Cypress run
        uses: cypress-io/github-action@v6
        with:
          build: npm run build
          start: npm start
          install_flags: 
             - "--force"
          browser: chrome

Why is this needed?

This is useful for my project and potentially many others because some larger projects may contain version dependency errors, and in our case, our app works perfectly fine despite those conflics.
We plan to include Cypress testing within Github actions, but every time the test starts, it fails simply because it fails to install all the required NPM packages within the project.

Image of error occurring in Github actions:
image

Other

No response

@jennifer-shehane
Copy link
Member

Moving issue to github-actions repo.

@jennifer-shehane jennifer-shehane transferred this issue from cypress-io/cypress Jan 5, 2024
@jennifer-shehane jennifer-shehane added the type: feature feature request label Jan 5, 2024
@MikeMcC399
Copy link
Collaborator

@Multinite

Your request for the ability to use an alternate command to install npm dependencies is already available.

Please see the Custom install command parameter install-command, where you could write for instance:

- uses: cypress-io/github-action@v6
  with:
    install-command: npm ci --legacy-peer-deps

@MikeMcC399
Copy link
Collaborator

I suggest to close this request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature feature request
Projects
None yet
Development

No branches or pull requests

3 participants