Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I don’t know why the new version reported an error #2645

Closed
KingJeason opened this issue Feb 25, 2021 · 12 comments · May be fixed by nuel/mastodon-old#660, Skyprx/mastodon#686, navikt/engangsstonad#717 or postxiami/mastodon#31
Labels

Comments

@KingJeason
Copy link

Which package?

intl-messageformat-parser 6.4.0

Describe the bug

when i update version to 6.4.0, find this error. when i downgrade to 6.3.4, it's greet,Save the child~
[!] Error: '__spreadArray' is not exported by tslib.js, imported by ../../node_modules/intl-messageformat-parser/lib/src/normalize.js

@KingJeason KingJeason added the bug label Feb 25, 2021
@maurelio1234
Copy link

maurelio1234 commented Feb 25, 2021

I have the same problem with react-intl.

I updated from 5.12.5 -> 5.13.0.

TypeError: tslib_1.__spreadArray is not a function

@eltiodelsofa
Copy link

I have the same problem with react-intl.

I updated from 5.12.5 -> 5.13.0.

TypeError: tslib_1.__spreadArray is not a function

I fixed the same problem installing tslib

@klarstrup
Copy link

klarstrup commented Feb 25, 2021

It's because they forgot to upgrade the tslib dependency when they use the new 2.1.0 __spreadArray helper

@longlho
Copy link
Member

longlho commented Feb 25, 2021

Sorry for the breakage we're publishing new versions w/ the fix

@joetidee
Copy link

I just installed react-intl 5.13.1 and received this error:

WARNING in ./node_modules/intl-messageformat/lib/src/core.js 103:57-70
"export '__spreadArray' was not found in 'tslib'
 @ ./node_modules/intl-messageformat/lib/index.js
 @ ./node_modules/react-intl/lib/src/components/provider.js
 @ ./node_modules/react-intl/lib/index.js
 @ ./src/components/error-404.jsx
 @ ./src/routes.js
 @ ./src/app.js
 @ multi ./src/app.js

I ran npm list @formatjs/intl-displaynames and got this:

└─┬ react-intl@5.13.1 invalid
├── @formatjs/intl-displaynames@4.0.9
└─┬ @formatjs/intl@1.8.1
└── @formatjs/intl-displaynames@4.0.9 de

@longlho
Copy link
Member

longlho commented Feb 28, 2021

Can you do npm ls tslib

@joetidee
Copy link

├─┬ @sentry/browser@5.24.2
│ ├─┬ @sentry/core@5.24.2
│ │ ├─┬ @sentry/hub@5.24.2
│ │ │ └── tslib@1.13.0 deduped
│ │ ├─┬ @sentry/minimal@5.24.2
│ │ │ └── tslib@1.13.0 deduped
│ │ └── tslib@1.13.0 deduped
│ ├─┬ @sentry/utils@5.24.2
│ │ └── tslib@1.13.0 deduped
│ └── tslib@1.13.0
├─┬ cypress@6.4.0
│ └─┬ listr@0.14.3
│   └─┬ rxjs@6.6.3
│     └── tslib@1.13.0 deduped
├─┬ react-intl@5.13.1
│ ├─┬ @formatjs/ecma402-abstract@1.6.1
│ │ └── tslib@2.1.0
│ ├─┬ @formatjs/intl-displaynames@4.0.9
│ │ └── tslib@2.1.0
│ ├─┬ @formatjs/intl-listformat@5.0.9
│ │ └── tslib@2.1.0
│ ├─┬ @formatjs/intl-relativetimeformat@8.1.1
│ │ └── tslib@2.1.0
│ ├─┬ @formatjs/intl@1.8.1
│ │ ├─┬ @formatjs/intl-datetimeformat@3.2.11
│ │ │ └── tslib@2.1.0
│ │ ├─┬ intl-messageformat-parser@6.4.1
│ │ │ └── tslib@2.1.0 deduped
│ │ └── tslib@2.1.0
│ ├─┬ intl-messageformat-parser@6.4.1
│ │ └── tslib@2.1.0 deduped
│ ├─┬ intl-messageformat@9.5.1
│ │ ├─┬ intl-messageformat-parser@6.4.1
│ │ │ └── tslib@2.1.0 deduped
│ │ └── tslib@2.1.0
│ └── tslib@2.1.0
├─┬ tidee-life-ui@1.0.0 -> /Users/joe/Sources/tidee-life/packages/tidee-life-ui
│ └─┬ webpack@4.44.2
│   └─┬ chrome-trace-event@1.0.2
│     └── tslib@1.13.0
└─┬ webpack@4.44.2
  └─┬ chrome-trace-event@1.0.2
    └── tslib@1.13.0 deduped

@longlho
Copy link
Member

longlho commented Feb 28, 2021

Looks like you have both tslib@1 & 2 so you'd have to resolve it to 2

@joetidee
Copy link

Is this a case of casing down the other package owners and getting them to upgrade their version of tslib to v2?

@longlho
Copy link
Member

longlho commented Feb 28, 2021

Do you have a repro repo?

@joetidee
Copy link

joetidee commented Mar 1, 2021

I do not. I reverted back to v3 to make do.

@joetidee
Copy link

joetidee commented Mar 7, 2021

Installed tslib 2.10 - fixed.

This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment