【发布时间】:2023-01-26 06:18:10
【问题描述】:
我的 nuxtjs 应用程序需要帮助。 我最近在应用程序中遇到了 eslint 冲突,因为我离开了一段时间而没有更新(2 个月)。因此,在我开始开发该应用程序后,它发布了试图解决 eslint 问题的挑战,因此我不得不将项目迁移到更新版本的节点和 eslint。在做儿子之后我解决了冲突问题并且我的项目可以安装我的依赖项,但是现在服务器无法启动,节点现在抛出一个错误我什至不知道如何开始修复,我不知道是否有很多其他人面临这个问题升级他们的 nodejs 版本后出现问题,但它抛出一个关于不受支持的哈希函数的错误。
这是阻止我的服务器启动的终端错误的屏幕截图,我已经解决了迁移带来的所有 eslint 和语法错误,所以我不知道还能做什么。我真的需要帮助。
下面是我的 nuxt.config.js 文件的 sn-p
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"]
},
}
【问题讨论】:
-
您是否尝试删除您的
node_modules,重新安装 yarn/pnpm 以检查一些错误?另外,前后有package.json吗?介意也共享nuxt.config.js文件吗? -
是的,我做到了,是的,我将分享我的 nuxt 配置文件
-
剩下的呢?
-
不删除 node_modules 不能解决问题,@kissu 什么测试?你指的是,那是我的整个 nuxt.config 文件。
标签: javascript node.js vue.js frontend nuxt.js