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

When deps are updated Stackblitz can't find core-js #930

Closed
oleersoy opened this issue Apr 11, 2019 · 12 comments
Closed

When deps are updated Stackblitz can't find core-js #930

oleersoy opened this issue Apr 11, 2019 · 12 comments

Comments

@oleersoy
Copy link

I have this project:

https://stackblitz.com/edit/slice-todo

It runs with the current dependency versions, but if I updated the deps I get the message:

Can't find package:core-js

Thoughts?

@beeman
Copy link

beeman commented Apr 12, 2019

Hey @oleersoy I have seen the same issue, you can work around it by installing core-js@2

@oleersoy
Copy link
Author

Hey @beeman - That was a sweet comment! It works now! Thanks!

@kolkov
Copy link

kolkov commented May 12, 2019

The same error in my https://github.com/kolkov/angular-editor library.

@MurhafSousli
Copy link

Thanks @beeman.. in the right place in the right time

@wzup
Copy link

wzup commented Jun 24, 2019

@beeman

you can work around it by installing core-js@2

HOW?? How to install anything in Stackblitz? Does it have CLI?

@nimirea
Copy link

nimirea commented Jun 24, 2019

@wzup You can change the versions of installed packages (or add new packages) for a project in the package.json file. Just change core-js: "^3.1.4" to core-js: "2.6.9"

@seoriam
Copy link

seoriam commented Jun 27, 2019

@wzup @nimirea You may also change it via the 'Dependencies' tab under the 'Project' tab (icon shaped like files) on the left sidebar.

If you shorten the 'Files' tab and expand the 'Dependencies', you can see the text input with placeholder "enter package name". You may enter your desired package and version with the format {package}@{version} (without the curly braces).

So downgrading core-js to 2 is as simple as entering core-js@2 to the input and hitting enter. Same when upgrading or installing additional dependencies. I love StackBlitz.

@fr0
Copy link

fr0 commented Jun 28, 2019

Downgrading to core-js@2 is a great workaround for some people, but if the behavior you're trying to replicate in your stackblitz depends on corejs@3, that's... not so great.

I'm very curious what bug would cause this. Doesn't stackblitz use the global npm registry?

@omostan
Copy link

omostan commented Feb 2, 2020

@wzup You can change the versions of installed packages (or add new packages) for a project in the package.json file. Just change core-js: "^3.1.4" to core-js: "2.6.9"

Your suggestion solved the problem.
Thanks!

@ghost
Copy link

ghost commented Jun 7, 2020

I had the same problem, this might be the same issue. if you open polyfills.ts in your angular project. You will have

import 'core-js/es6/symbol';

here core-js/es6 is doesn't exist since v3, update it to core-js/es

import 'core-js/es/symbol';

@omostan
Copy link

omostan commented Sep 3, 2020

I had the same problem, this might be the same issue. if you open polyfills.ts in your angular project. You will have

import 'core-js/es6/symbol';

here core-js/es6 doesn't exist since v3, update it to core-js/es

import 'core-js/es/symbol';

This is the best solution to the problem. With this solution, you can still use core-js current version without errors. According to @sibiraj-sr, core-js/es6 or core-js/es7 were removed from core-js v3. Editing polyfills.ts as stated removes the errors.

@purplem1lk
Copy link
Contributor

Hey @oleersoy I have seen the same issue, you can work around it by installing core-js@2

I had the same problem, this might be the same issue. if you open polyfills.ts in your angular project. You will have

import 'core-js/es6/symbol';

here core-js/es6 is doesn't exist since v3, update it to core-js/es

import 'core-js/es/symbol';

Thank you for your patience - This issue has been resolved and will be closed accordingly. If this issue persists, feel free to tag me or ask to reopen this issue with screenshots of the error. Thank you! :)

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

10 participants