首页 > 其他分享 >使用nuxtjs静态部署时报错TypeError: renderContext.renderResourceHints is not a function

使用nuxtjs静态部署时报错TypeError: renderContext.renderResourceHints is not a function

时间:2023-07-13 16:14:14浏览次数:35  
标签:function TypeError nuxtjs 静态 renderResourceHints renderContext nuxt

在使用nuxt框架进行静态打包部署时候每次总会有一两个界面报TypeError: renderContext.renderResourceHints is not a function的错误

 一开始以为是asyncData中获取的数据有问题,在各种排查后返现数据没问题,再次编译还是会有错误,最后甚至把asyncdata方法给删除掉都还是有这个错误;

翻阅nuxt文档后发现了一个参数

突然想到可能是这个问题,于是赶紧去nuxt.config.js中配置

 最后再次编译完美通过,缺点就是编译时间大大边长,所以可能的话还是用不用静态部署;

 

标签:function,TypeError,nuxtjs,静态,renderResourceHints,renderContext,nuxt
From: https://www.cnblogs.com/rht555/p/17551168.html

相关文章

  • [Vue] 使用pdf-lib和@pdf-lib/fontkit 报错 fontkit.create is not a function
    描述:pdf-lib注册了@pdf-lib/fontkit后(pdfDoc.registerFontkit(fontkit)),内部调用了fontkit的create方法,但是这个方法不存在。我在控制台打印了下fontkit对象,发现fontkit包了一层default,即 fontkit.default.create(),所以找不到这个方法, pdf-lib使用的是 fo......
  • js/ts文件中,导入i18n报错:Must be called at the top of a `setup` function
    import{useI18n}from'vue-i18n';const{t}=useI18n(); 会在非组件情况下报错: 此时我们需要将上述导入方式改为:importi18nfrom'@/lang/i18n';//@/lang/i18n为语言包位置const{t}=i18n.global;......
  • 【Semantic Kernel】3、本机函数(Native Function)
    基础定义最基本的NativeFunction定义只需要在方法上添加SKFunction的特性即可。usingMicrosoft.SemanticKernel.SkillDefinition;usingMicrosoft.SemanticKernel.Orchestration;namespaceMySkillsDirectory;publicclassMyCSharpSkill{[SKFunction("Return......
  • 2023-06-04-Generating-Function-Editor
    You'regrowingdesperatefromthefight.基本策略已知系数的幂级数首先是一些可以通过整体法得到封闭形式的幂级数,所谓整体法,即是通过将幂级数位移,用自己表示自己然后做差。\[\begin{aligned}\left\langle1,1,1,1,1,\dots\right\rangle&\rightarrow\frac{1}{1......
  • 2023-05-20-Probability-Generating-Function
    It'stimetorollthedice.\(\mathtt{Definition}\)令\(X\)为取值非负的随机变量,那么\(X\)的概率生成函数\(\mathtt{Probability\Generating\Function}\)为\[\begin{aligned}G_x(z)=\sum_{k\ge0}\mathrm{Pr}(X=k)z^k\end{aligned}\]根据上式可以得知......
  • 重写JSON.stringify与JSON.parse使其支持解析function类型
    constJSONStringify=(option)=>{returnJSON.stringify(option,(key,val)=>{//处理函数丢失问题if(typeofval==='function'){return`${val}`;}//处理undefined丢失问......
  • How to use handleChange() function in react component?
    An onChange eventistriggeredwhenvaluesareenteredintheinput.Thisfiresafunction handleChange(),thatisusedtosetanewstatefortheinput.1.HandlingSingleInputFirst,wehavetosetuptheinputfieldasacontrolledcomponentsothatw......
  • 基于 Spring Cloud Function 的 Azure Function 开发
    Notice:本文章不包含AzureFunction环境配置等内容1.1前提Azure账户,且有可使用的订阅Azure支持的JDK(本教程适用于JDK1.8)IntelliJIDEA社区版或无限制版均可Maven3.5+最新的FunctionCoreTools1.2创建SpringCloudFunctionAzure工程在Github仓......
  • 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in
    项目场景:mysql创建function报错误1418-ThisfunctionhasnoneofDETERMINISTIC,NOSQL,orREADSSQLDATAin问题描述:执行创建函数的sql语句时,提示:ThisfunctionhasnoneofDETERMINISTIC,NOSQL,orREADSSQLDATAinitsdeclarationandbinaryloggingisenab......
  • 2023-07-03 uniapp小程序端报错:TypeError: eval is not a function
    完整报错:ErrorinonLoadhook:"TypeError:evalisnotafunction" onLoad钩子中的错误:“TypeError:eval不是函数”原因:代码里使用了eval函数,小程序端不支持该函数,h5端和app(Android)端支持。解决方案:小程序端采取替换eval方案。注意:eval函数被认为是不安全的函数,存在脚本代......