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

Getting an error on yarn start #48

Closed
ShirishRam opened this issue May 27, 2020 · 6 comments
Closed

Getting an error on yarn start #48

ShirishRam opened this issue May 27, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@ShirishRam
Copy link

ShirishRam commented May 27, 2020

I am getting an error on running yarn start in my local box. Below is the error stack trace:

Failed to compile.

./src/package/assets/icons/drop_file.svg (./node_modules/@svgr/webpack/lib?-svgo,+titleProp,+ref!./src/package/assets/icons/drop_file.svg)
Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
Require stack:
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/@svgr/webpack/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/@svgr/webpack/node_modules/@babel/preset-env/lib/index.js
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/@svgr/webpack/lib/index.js
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/loader-runner/lib/loadLoader.js
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/loader-runner/lib/LoaderRunner.js
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/webpack/lib/NormalModule.js
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/webpack/lib/NormalModuleFactory.js
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/webpack/lib/Compiler.js
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/webpack/lib/webpack.js
- /Users/shirish/Documents/repo/react-ultimate-resume/node_modules/react-scripts/scripts/start.js

OS version: macOS Catalina 10.15.1
Node version: 14.3.0

@ShirishRam ShirishRam changed the title Getting an error on yarn run Getting an error on yarn start May 27, 2020
@ag
Copy link

ag commented Jun 7, 2020

Hi all,

unfortunately, I am getting the exact same error and do not know how to debug. Already tried a removing the node modules, a fresh install and updating the node modules. Nothing works for me.

Thanks in advance

@BOLT04
Copy link
Contributor

BOLT04 commented Jun 7, 2020

Hi @ShirishRam and @ag, it seems the problem is due to the Node version you are using: 14.3.0. I found this issue and it's probably the same reason this error is occurring.

Try to run npm update or just update the dependencies @babel/preset-env and @babel/core to the latest version or 7.9.6.

@clementdevos
Copy link
Contributor

clementdevos commented Jun 15, 2020

Hey,

Lots of projects seem to be impacted by this issue.
storybookjs/storybook#10477

I've tried to use node 14 and run yarn update but we're kind of stuck. yarn update updates react-spring andwWe've made the error to use their beta and the API changed.

We need to update the project AND our main application before fixing this whole thing.

Definitely need to do this asap.

Can you use node 12 for now? I've noted node 12.18 does not work, node 12.10 does... =(

@pixelmord
Copy link

I encountered the same problem. I could solve it by removing node_modules and yarn.lock and adding @babel/compat-data to the dev deps and using @babel/preset-env and @babel/core in version 7.9.6 or higher.

However then with the new versions (in the specified range) of all the other packages as well, the app will be built and started but without content on the cards and errors in the console. Thap happens with HEAD as well as with downloaded previous betas

Since the first problem seems to be occurring with new versions of node that might also be the cause to break the app. The console errors hint at a problem with a called useLayoutEffect hook that got an object instead of an array as a dependency parameter.

Might be worth a separate issue though

@mohshbool
Copy link

I encountered the same problem. I could solve it by removing node_modules and yarn.lock and adding @babel/compat-data to the dev deps and using @babel/preset-env and @babel/core in version 7.9.6 or higher.

However then with the new versions (in the specified range) of all the other packages as well, the app will be built and started but without content on the cards and errors in the console. Thap happens with HEAD as well as with downloaded previous betas

Since the first problem seems to be occurring with new versions of node that might also be the cause to break the app. The console errors hint at a problem with a called useLayoutEffect hook that got an object instead of an array as a dependency parameter.

Might be worth a separate issue though

i tried this method on node v14.15 but it shows, as mentioned previously, empty cards

@clementdevos
Copy link
Contributor

Good news everyone !

We finally decided to remove react-spring from the project and switched to framer/motion which is stable !

Project runs fine on node 14.15, both on dev and built versions.

Thanks to @val-fcn for his work and @VincentCtr for the review and small finishing touches.

I'm finally closing this !

@clementdevos clementdevos unpinned this issue Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants