Override default npm ci --progress=false

i want to set it to npm install --optional=false, so it doesn't install optional dependency and cause error. So how can i change the default. I beleive that this is what's causing a lot of problem
1 Reply
Art_Paul
Art_PaulOP3mo ago
NVM decided to stop using auto deploy instead used github workflow to deploy to cloudflare in .github/workflow/deploy.yml
name: Deploy to Cloudflare Pages

on:
push:
branches:
- main # or your default branch

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies without optional
run: npm install --no-optional

- name: Build project
run: npm run build
env:
PUBLIC_URL: "./"
REACT_APP_ANALYTICS_SCRIPT_ID: ${{ secrets.REACT_APP_ANALYTICS_SCRIPT_ID }}


- name: Install Wrangler CLI
run: npm install -g wrangler

- name: Publish to Cloudflare Pages
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: wrangler pages publish ./dist --project-name projectname
name: Deploy to Cloudflare Pages

on:
push:
branches:
- main # or your default branch

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies without optional
run: npm install --no-optional

- name: Build project
run: npm run build
env:
PUBLIC_URL: "./"
REACT_APP_ANALYTICS_SCRIPT_ID: ${{ secrets.REACT_APP_ANALYTICS_SCRIPT_ID }}


- name: Install Wrangler CLI
run: npm install -g wrangler

- name: Publish to Cloudflare Pages
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: wrangler pages publish ./dist --project-name projectname

Did you find this page helpful?