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

Page Not Found for Remix + Vite App #1155

Open
krlakwa opened this issue Apr 3, 2024 · 2 comments
Open

Page Not Found for Remix + Vite App #1155

krlakwa opened this issue Apr 3, 2024 · 2 comments

Comments

@krlakwa
Copy link

krlakwa commented Apr 3, 2024

I'm trying to deploy my Remix + Vite app but I can see only Page not found on Netlify. It occurs only when I'm trying to deploy using Github Actions, it works fine when I enable automatic deploy on Netlify. Has anyone struggle with similar issue? Here's like my config files look like:
deploy.yml

name: Deploy

on:
  workflow_dispatch:

jobs:
  app-setup:
    runs-on: ubuntu-latest
    steps:
      - name: Configure AWS CLI
        uses: aws-actions/configure-aws-credentials@v2
        with:
          aws-region: eu-central-1
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Login to AWS CodeArtifact
        run: |
            aws codeartifact login --tool npm --repository ${{ secrets.AWS_CODEARTIFACT_REPOSITORY }} --domain ${{ secrets.AWS_CODEARTIFACT_DOMAIN }} --domain-owner ${{ secrets.AWS_CODEARTIFACT_DOMAIN_OWNER }}

      - name: Configure node
        uses: actions/setup-node@v4
        with:
          node-version-file: ".nvmrc"


      - name: Install dependencies
        run: npm ci

      - name: Build
        run: npm run build

      - name: Deploy to Netlify
        uses: nwtgck/actions-netlify@v3.0
        with:
          publish-dir: "./build/client"
          production-branch: master
          github-token: ${{ secrets.GITHUB_TOKEN }}
          deploy-message: "Deployed from GitHub Actions"
          functions-dir: ".netlify/functions-internal"
          netlify-config-path: 'netlify.toml'

        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

netlify.toml

[build]
command = "npm run build"
publish = "build/client"

[dev]
command = "npm run dev"
framework = "vite"
@nwtgck
Copy link
Owner

nwtgck commented Apr 4, 2024

The result of adding find ... command may be useful for debugging:

- name: Build
   run: npm run build
# Added for debug
- run: find . -depth 2 | grep -v node_modules | grep -v .git
- ...

@braincomb
Copy link

@krlakwa is your site SSR? I noticed you are deploying functions.

I'm currently struggling with a similar issue where deploying functions-dir doesn't quite work as expected, I can see the function being picked up by Netlify but still seeing Page Not Found. When I do netlify deploy manually, everything works.

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

No branches or pull requests

3 participants