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

rxjs 7.0.0 has error #6315

Closed
xp44mm opened this issue May 2, 2021 · 8 comments
Closed

rxjs 7.0.0 has error #6315

xp44mm opened this issue May 2, 2021 · 8 comments

Comments

@xp44mm
Copy link
Contributor

xp44mm commented May 2, 2021

when i upgrade rxjs 7.0.0, use webpack has error:

WARNING in ./node_modules/rxjs/dist/esm5/internal/Subscriber.js 122:34-47
export '__spreadArray' (imported as '__spreadArray') was not found in 'tslib'
....

and have a lot of error same as above. Although it is a warning, the program does not execute correctly and will be interrupted.

change rxjs version back to 6.6.7 the work properly again. my code too much to ditermine where is the problem.

@xp44mm xp44mm changed the title rxjs 7.0 has error rxjs 7.0.0 has error May 2, 2021
@cartant
Copy link
Collaborator

cartant commented May 2, 2021

Needs a minimal reproduction, as __spreadArray is definitely exported in the version of tslib in this package's package.json:

rxjs/package.json

Lines 129 to 131 in 4dda357

"dependencies": {
"tslib": "~2.1.0"
},

https://github.com/microsoft/tslib/blob/2.1.0/tslib.js#L206-L210

https://github.com/microsoft/tslib/blob/2.1.0/tslib.js#L294

@xp44mm
Copy link
Contributor Author

xp44mm commented May 2, 2021

before i post this issue, i searched in website, and found this : microsoft/tslib#149

@cartant
Copy link
Collaborator

cartant commented May 2, 2021

That issue has no reproduction either, so if anything is to be done about here, one will need to be provided.

In any case, it's clear that the export was added in the version of tslib upon which this package depends: https://github.com/microsoft/tslib/releases/tag/2.1.0

@xp44mm
Copy link
Contributor Author

xp44mm commented May 2, 2021

a reproduction: https://github.com/xp44mm/hyperscript-rxjs-test

just execute npm start on both 6.6.7 and 7.0.0 of rxjs.

@cartant
Copy link
Collaborator

cartant commented May 2, 2021

Please provide a repro that does not contain packages published from what appears to be a private repo. This is on npm, but the GitHub projects are private:

https://www.npmjs.com/package/hyperscript-rxjs

I won't be installing it. Please provide a minimal repro that uses only well-known open-source packages.

@cartant
Copy link
Collaborator

cartant commented May 2, 2021

FWIW, I've tweaked a small CRA-based harness that I have on this notebook to use RxJS 7.0.0 and have confirmed that it is installed with tslib 2.1.0 and - when type checked with TypeScript 4.2.4 and compiled with react-scripts 3.4.1 - it works fine. That leads me to believe that any problem is specific to your build process or to the tool versions used in said process. I don't believe that there is a problem that can be addressed here, in RxJS.

@xp44mm
Copy link
Contributor Author

xp44mm commented May 2, 2021

I'm using pure js project instead of ts, I've added dependency packages tslib into package.json, and the problem is solved.

@cartant
Copy link
Collaborator

cartant commented May 2, 2021

It's something with your configuration. CRA builds using Babel, not TypeScript. It should not be necessary to add tslib when it's added as an RxJS dependency.

@cartant cartant closed this as completed May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants