我的 NuxtJS 应用程序需要帮助。
最近,在我离开应用程序一段时间(2 个月)而没有更新后,应用程序中出现了 ESLint 冲突。因此,在我开始研究它之后,尝试解决 ESLint 问题提出了挑战。然后我必须将项目迁移到较新版本的 Node 和 ESLint。
这样做之后,我解决了冲突问题,我的项目可以安装我的依赖项,但现在服务器无法启动。节点现在抛出一个错误,我什至不知道如何修复。我不知道许多其他人在升级 Node.js 版本后是否面临这个问题,但它抛出了有关不支持的哈希函数的错误。
这是阻止我的服务器启动的终端错误的屏幕截图:
我已经解决了迁移带来的所有 ESLint 和语法错误,所以我不知道还能做什么。
下面是我的 nuxt.config.js 文件的片段:
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',
},
], …Run Code Online (Sandbox Code Playgroud)