Ways to resolve "Error: error:0308010C:digital envelope routines::unsupported" error in Nodejs 18
P粉121081658
P粉121081658 2023-10-18 15:53:45
0
2
492

Need help with my NuxtJS application.

Recently, I got an ESLint conflict in the application after I left it for a while (2 months) without updating. So after I started working on it, trying to solve the ESLint problem presented a challenge. Then I had to migrate the project to newer versions of Node and ESLint.

After doing this, I resolved the conflict issue and my project can install my dependencies, but now the server won't start. Node is now throwing an error that I don't even know how to fix. I don't know if many others faced this issue after upgrading their Node.js version, but it threw an error about unsupported hash function.

Here is a screenshot of the terminal error that prevents my server from starting:

I've already fixed all the ESLint and syntax errors that came with the migration, so I don't know what else to do.

Here is a snippet of my nuxt.config.js file:

export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'heritage-fd',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ],
    
    script: [
      {
        src: '~/static/css/bootstrap.min.js',
      },
    ],
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    {src: '~/static/css/bootstrap.min.css', lang: 'scss'},
    {src: '~/assets/scss/custom.scss', lang: 'scss'},
    {src: "~layouts/global.css"},
    {src: '~/static/css/style.css', lang: 'scss'},
    {src: '~/assets/css/main.css'}
    
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
   plugins: [
    "~/plugins/vee-validate.js",
    { src: '~/plugins/persistedState.client.js', ssr: false }
   ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
    // https://go.nuxtjs.dev/eslint
    '@nuxtjs/eslint-module',
    'nuxt-gsap-module',
    '@nuxtjs/fontawesome',
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
    // https://go.nuxtjs.dev/pwa
    '@nuxtjs/pwa',
    '@nuxtjs/auth-next',
    'nuxt-vue-select'
  ],

  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {
    // Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
    baseURL: 'http://localhost:8000/api/',
    
  },

  // PWA module configuration: https://go.nuxtjs.dev/pwa
   pwa: {
    manifest: {
      lang: 'en',
    },
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
 build: {
    transpile: ["vee-validate/dist/rules"],
    vendor: ["vue-tables-2"]
  },
}


P粉121081658
P粉121081658

reply all(2)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!