0

I've developed an application using Nuxt3, hosted it on Netlify, and incorporated Netlify Functions. Everything works smoothly when i set ssr: false, but when I opt for the default option ssr: true, i encounter an error when $fetch calls a Netlify function:

[nitro] [unhandledRejection] FetchError: [GET] "/.netlify/functions/customFunction1": 404 Page not found: /.netlify/functions/customFunction1

I'm trying to figure out what's causing this issue. Any insights on what I might be missing?

nuxt.config.js

export default defineNuxtConfig({
  devtools: { enabled: true },

  runtimeConfig: {
    public: {
      gtagId: 'XXXXXX',
    },
    app: {
      "baseURL": "/",
    }
  },


  modules: ["@nuxtjs/i18n", "@pinia/nuxt"],

  i18n: {
    vueI18n: "./i18n.config.js",
  },

  css: [
    "vuetify/lib/styles/main.sass",
    "@mdi/font/css/materialdesignicons.min.css",
    "@/assets/style/main.scss",
  ],

  build: {
    transpile: ["vuetify"],
  },

  alias: {
    pinia: "/node_modules/@pinia/nuxt/node_modules/pinia/dist/pinia.mjs"
  }

});
2
  • Do you use Netlify's CLI for the dev environment? Commented Jan 31, 2024 at 11:26
  • Yes, running the project with 'netlify dev' Commented Jan 31, 2024 at 15:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.