首页 > 系统相关 >【Azure App Service for Linux】NodeJS镜像应用启动失败,遇见 RangeError: Incorrect locale information provided

【Azure App Service for Linux】NodeJS镜像应用启动失败,遇见 RangeError: Incorrect locale information provided

时间:2023-08-29 19:33:06浏览次数:50  
标签:Incorrect information 21 provided 08 server web 2023 29T11

问题描述

在App Service For Linux 中,部署NodeJS应用,应用启动失败。

报错信息为:

2023-08-29T11:21:36.329731566Z RangeError: Incorrect locale information provided
2023-08-29T11:21:36.329776866Z at Intl.getCanonicalLocales (<anonymous>)
2023-08-29T11:21:36.329783066Z at CanonicalizeLocaleList (/app/web/.next/server/chunks/8112.js:396:17)
2023-08-29T11:21:36.329797266Z at match (/app/web/.next/server/chunks/8112.js:656:108)
2023-08-29T11:21:36.329801166Z at getLocaleOnServer (/app/web/.next/server/chunks/7614.js:162:63)
2023-08-29T11:21:36.329804566Z at LocaleLayout (/app/web/.next/server/chunks/7614.js:89:55)
2023-08-29T11:21:36.329808467Z at X (/app/web/.next/server/chunks/8112.js:2419:13)
2023-08-29T11:21:36.329811967Z at Na (/app/web/.next/server/chunks/8112.js:2587:21)
2023-08-29T11:21:36.329815367Z at Array.toJSON (/app/web/.next/server/chunks/8112.js:2347:20)
2023-08-29T11:21:36.329818767Z at stringify (<anonymous>)
2023-08-29T11:21:36.329822167Z at da (/app/web/.next/server/chunks/8112.js:1861:9)
2023-08-29T11:21:36.339132982Z [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
2023-08-29T11:21:36.339162983Z digest: '833304465'
2023-08-29T11:21:36.339168383Z }

 

问题解答

当前App Service 应用使用 node:18 的镜像启动,这个镜像是基于Debian的,且没有安装locales相关packages。

在镜像(Dockerfile)中加入以下命令可以成功启动:

RUN apt-get update
RUN apt-get -y install locales
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

 

标签:Incorrect,information,21,provided,08,server,web,2023,29T11
From: https://www.cnblogs.com/lulight/p/17665692.html

相关文章

  • 【maven】idea运行项目的时候,因为依赖maven坐标是provided报错NoClassDefFoundError解
    1、查看报错的类的生命周期-基于在idea安装mavenhelper插件  2、在运行maven项目的入口新增配置项 ......
  • The POM for xxxx is missing, no dependency information available解决方案
    骑士李四记录:maveninstall报错ThePOMforcom.xxxxismissing…nodependencyinformationavailable解决方案:现在父工程上先执行maveninstall,这时候会自动下载很多依赖包,等到父工程buildsuccess的时候,在执行子工程。......
  • DP报Script failed. Cannot get information from remote host案例
    HPDP(DataProtectorManager)上一个刚刚迁移升级的数据库备份作业失败,具体失败信息如下.................................RMAN-08503: piece handle=c-1684727642-20230822-00 comment=API Version 2.0,MMS Version 65.10.40.118RMAN-03091: Finished Control File......
  • 论文解读(MetaAdapt)《MetaAdapt: Domain Adaptive Few-Shot Misinformation Detection
    Note:[wechat:Y466551|可加勿骚扰,付费咨询]论文信息论文标题:MetaAdapt:DomainAdaptiveFew-ShotMisinformationDetectionvia MetaLearning论文作者:ZhenruiYue、HuiminZeng、YangZhang、LanyuShang、DongWang论文来源:2023ACL论文地址:download 论文代码:download......
  • 解决warning:libpng warning: iCCP: known incorrect sRGB profile
    参考链接:https://blog.csdn.net/qq_37924224/article/details/119181028?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168776812116782427434491%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=168776812116782427434491&b......
  • telnet:Login incorrect
      问题描述:telnet服务端和客户端的telnet服务均正常,并且防火墙也是关闭的,但是根据提示输入用户名和密码后,还是无法连接连接到telnet客户端,如下图,提示:Loginincorrect(登录不正确),但是用户名和密码是完全正确的;解决办法:查看telnet客户端日志: cat/var/log/secure看到......
  • 安装MinGW时报错“The file has been downloaded incorrectly!”解决方案
    前言作为一个准备学习C语言的准大一的通信工程崽子,Linux还不会用,在Windows上使用gcc得安装MinGW。我知道各位大佬们看到第一句话之后想说些什么。虽然说有很多优秀的编程软件自带了MinGW,但是想想,如果使用Windows的cmd直接敲个“gcc-v”来跑代码,逼格不直接蹭蹭上涨,能够充分满足......
  • 码云git clone报错Incorrect username or password ( access token )
    使用码云将仓库clone到本地,报错信息如下:D:\\123\>gitclonehttps://gitee.com/ycyzharry/helloworld.gitCloninginto'helloworld'...remote:Incorrectusernameorpassword(accesstoken)fatal:Authenticationfailedfor'https://gitee.com/ycyzharry/h......
  • [PWA] Get installed related information
    constinstalledApps=awaitnavigator.getInstalledRelatedApps()constpackageId="com.app.pwa"constapp=installedApps.find(app=>app.id===packageId)if(app){console.log(`${app.id}version${app.version}isinstalled`)} For......
  • mysql插入报错java.sql.SQLException: Incorrect string value: '\xF0\x9F\x87\xA
    背景环境java8,centos7.9,mysql8.0.34新装的环境,默认给装了mysql8,想着与时俱进用下新版,结果插入就报错java.sql.SQLException:Incorrectstringvalue:'\xF0\x9F\x87\xA8\xF0\x9F...'forcolumn解决方法这个错误通常是由于MySQL数据库中的字符集不支持存储特定的字符或表情符......