简体   繁体   English

获取@formatjs/ecma402-abstract version1.3 发现错误:DateTimeFormat/skeleton.d.ts(4,13) ',' 预期。 TS1005 错误

[英]Getting a @formatjs/ecma402-abstract version1.3 found error: DateTimeFormat/skeleton.d.ts(4,13) ',' expected. TS1005 Error

In the React project I'm using "react-intl": "^5.6.8" and all of sudden it started breaking when running a dev server or building, throwing an error related to the formatjs :在 React 项目中,我正在使用"react-intl": "^5.6.8"并且在运行开发服务器或构建时突然开始中断,抛出与formatjs相关的错误:

   /node_modules/@formatjs/ecma402-abstract/src/DateTimeFormat/skeleton.d.ts(4,13):


    2 | export declare function processDateTimePattern(pattern: string, result?: Pick<DateTimeFormatOptions, 'weekday' | 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'timeZoneName'> & {
    3 |     hour12?: boolean;
  > 4 | }): [pattern: string, pattern12: string];

Any ideas how to fix this?任何想法如何解决这一问题?

Thanks.谢谢。

Managed to fix the issue by updating TypeScript to the latest version (4.0.5)通过将 TypeScript 更新到最新版本 (4.0.5) 设法解决了该问题

npm i -D typescript@latest

The issue is still open on github .该问题在github上仍然存在。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 反应 typescript '=' 预期。 TS1005 - React typescript '=' expected. TS1005 数组中的散布操作出错。 TS1005:“,”应为。 打字稿 - Error with spread operation in array. TS1005: ',' expected. TypeScript /home/Documents/node_modules/cheerio-select/lib/index.d.ts(1,15) 中的 TypeScript 错误:预期为 [0] ','。 TS1005 - TypeScript error in /home/Documents/node_modules/cheerio-select/lib/index.d.ts(1,15): [0] ',' expected. TS1005 错误 - [tsc] node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.types.d.ts(13,35): 错误 TS1005: &#39;;&#39; 预期的 - Error - [tsc] node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.types.d.ts(13,35): error TS1005: ';' expected &#39;=&gt;&#39; 预期。 用于 Redux 操作接口的 TS1005? - '=>' expected. TS1005 for Redux Action Interface? TS1005 错误,“,”预期为 simple.forEach 循环 - TS1005 error, ','expected with simple .forEach loop 打字稿:呈现自定义脚本标签会引发错误TS1005:“}” - Typescript: render custom script tag throws error TS1005: '}' expected SPFx Webpart - node_modules/@types/ [prop types] 和 [react] index.d.ts:gulp 构建时加载“错误 TS1005” - SPFx Webpart - node_modules/@types/ [prop types] and [react] index.d.ts: loads of "error TS1005" on gulp build 在 App.js 中出现奇怪的错误 &quot;&#39;)&#39; expected.ts(1005)&quot; - getting weird error "')' expected.ts(1005)" in App.js html 布局中的错误 ',' expected.ts(1005) - Error ',' expected.ts(1005) in html layout
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM