Estoy tratando de implementar la función solo en firebase, aquí está el error:
+ functions: required API cloudfunctions.googleapis.com is enabled Error: Error occurred while parsing your function triggers. C:\Users\User\Documents\someapps\functions\nuxt.config.js:1 import colors from 'vuetify/es5/util/colors' ^^^^^^ SyntaxError: Cannot use import statement outside a module at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1025:15) at Module._compile (node:internal/modules/cjs/loader:1059:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:816:12) at Module.require (node:internal/modules/cjs/loader:999:19) at require (node:internal/modules/cjs/helpers:93:18) El error principal es: SyntaxError: Cannot use import statement outside a module .
Parte importante de nuxt.config.js :
import colors from 'vuetify/es5/util/colors' export default { vuetify: { customVariables: ['~/assets/variables.scss'], theme: { dark: false, themes: { light: { info: colors.teal.lighten1, warning: colors.amber.base, } } } } } Los colors usados por vuetify config entre otros, ¿cómo refactorizar import colors sin error?
Transpile como sugiere la documentación:
build: { transpile: ['vuetify/es5/util/colors'], } El error cambió a ReferenceError: colors is not defined ya que no sé dónde/cómo definir los colors sin import .