nuxt / vercel-builder

Vercel Builder for Nuxt
MIT License
645 stars 76 forks source link

"Could not load Nuxt configuration. Make sure all dependencies are listed in package.json dependencies or in serverFiles within builder options" even if the file is in serverFiles #681

Closed learntheropes closed 2 years ago

learntheropes commented 2 years ago

I get "Could not load Nuxt configuration. Make sure all dependencies are listed in package.json dependencies or in serverFiles within builder options"

Even if:

/assets/js/locales.js

export const validate = {
  'en': 'en',
  'pt': 'pt_BR',
  'es': 'es'
}

vercel.json

{
  "src": "nuxt.config.js",
  "use": "@nuxtjs/vercel-builder",
  "config": {
    "internalServer": true,
    "serverFiles": ["assets/js/locales"]
  }
}

nuxt.config.js

import { validate } from './assets/js/locales'

How can I import a js file (not a npm module) in nuxt.config.js?

learntheropes commented 2 years ago
"serverFiles": ["assets/js/locales.js"]