Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

265
Visualizações
Error: el almacenamiento en caché se dejó sin configurar. Complementos de Babel cuando instalé Font Awesome en mi aplicación de reacción

Me gustaría usar Font Awesome en mi aplicación React, pero cuando instalé npm de Font Awesome tuve este error:

 Error: Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured for various types of caching, using the first param of their handler functions: module.exports = function(api) { // The API exposes the following: // Cache the returned value forever and don't call this function again. api.cache(true); // Don't cache at all. Not recommended because it will be very slow. api.cache(false); // Cached based on the value of some function. If this function returns a value different from // a previously-encountered value, the plugins will re-evaluate. var env = api.cache(() => process.env.NODE_ENV); // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for // any possible NODE_ENV value that might come up during plugin execution. var isProd = api.cache(() => process.env.NODE_ENV === "production"); // .cache(fn) will perform a linear search though instances to find the matching plugin based // based on previous instantiated plugins. If you want to recreate the plugin and discard the // previous instance whenever something changes, you may use: var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production"); // Note, we also expose the following more-verbose versions of the above examples: api.cache.forever(); // api.cache(true) api.cache.never(); // api.cache(false) api.cache.using(fn); // api.cache(fn) // Return the value that will be cached. return { }; };

y estas son mis dependencias de desarrollo:

 "devDependencies": { "@babel/core": "^7.17.5", "@babel/preset-env": "^7.16.11", "babel-loader": "^8.2.3", "webpack": "^5.70.0" }

He creado 2 archivos nuevos como en el tutorial babel.config.js:

 module.exports = function (api) { return { plugins: ['macros'], } }

y babel-plugin-macros.config.js:

 module.exports = { 'fontawesome-svg-core': { 'license': 'free' } }

pero todavía tengo este error

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

La forma más fácil para mí es cambiar el formato de mi configuración de babel de babel.config.js a .babelrc. Después de eso no vi ningún tipo de error de ese tipo. Vaya aquí para obtener más explicaciones.

about 4 years ago · Juan Pablo Isaza Relatório

0

Para corregir este error, cambié un poco de babel.config.js:

 module.exports = function (api) { api.cache(true); return { plugins: ['macros'], } }
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda