-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Cannot find module babel-preset-react-app/node_modules/@babel/runtime/helpers/slicedToArray #7183
Comments
Please post the full error message so that the problematic module can be identified. |
Hi @Pajn , Here is the full error message from the browser: formatWebpackMessages.js:9 Uncaught Error: Cannot find module '/Users/pehhuishi/code/react/practice/react-practice/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/slicedToArray' |
Try: npm add @babel/runtime |
@errk01 Sadly but with |
@GomatoX try:
|
I'm have likely the same issue but with the objectSpread2, i don't what is causing this, but some how the babel-preset-react-app is requiring the @babel/runtime@7.5.0 |
I have the same problem, but with objectSpread2 My workaround is to force babel-preset-react-app to use newer version 7.5.0 instead of 7.4.3.
It may be related to babel/babel#10169 |
Thank you @anhquande. It's work for me. |
@bugzpodder Thanks, it seems working. For yarn workspaces I just have to add module in global scope: "nohoist": [
"**/babel-preset-react-app/@babel/runtime"
] |
try:
it solves both incorrect module import and absolute path |
For me the latest version from babel fixed. I just remove the yarn.lock and run yarn install |
thank you so much |
This was sufficient for me,thank you! |
This happened to me right now, comes as a result of me composing my state files into containers. use: npm add @babel/runtime and restart the app. |
Solved it for me, thanks @fikar46 👍 |
thanks it workes for me |
* Create new component for project card * Set fixed height of project cards * Make project cards slightly wider * Make content of project cards scrollable * Refactor styles * Add babel runtime due to compile error, see facebook/create-react-app#7183
The same problem happened to me. Thanks all |
None of the above worked for me. I had to remove both package-lock.json AND node_modules and install again: Solved! |
I've tried all steps here without any luck, whenever I delete everything and start over (on 3.1.0 or 3.1.1) I end up with the following message: Cannot find module 'repo-path-here/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault' from 'setupTests.js'. because those files are hoisted to the main @babel folder. |
|
Addresses the following bug: facebook/create-react-app#7183
In my case, I had an issue with my babel-loader cache. By default it's in Make sure to delete it before running your scripts and it might solve your issues. |
I can not thank you enough. I appreciate your time and effort for helping us out @errk01 . Quick Question: How did you know that this command would fix our error? I am trying to comprehend how you were able to acquire the knowledge base where you knew that this exact command would fix our error. |
hi, I had this message: "Cannot find module (..) babel-preset-react-app \ node_modules \ @babel \ runtime / helpers / slicedToArray" The funny thing is that I trun of computer with working, commited project yesturday, and today i see this bug message in my console. Another funny thing, it was beggining of my porject, so when I couldn't find solution I started new one and just after changing some text on default react app page, bug couse again. I tryed new projects and it is always the same, witch maked my furious. Finaly I deleted node_modules folder and taped npm i - working now... |
get the same error after
fix the problem |
@VasiliKubarka tip woked to me, but is removing the absolute imports of my react components |
I deleted node_modules folder and did npm i. its working now 😂 |
I could fix this issue with |
works here |
None of the above worked for me... |
I've tried everything everyone above has suggested, and none of it has worked for me. I still get the initial error: this is on a brand new react app, I haven't even added anything into it. |
+1
|
Also having the same issue right now, maybe some internal dependency had a breaking change we don't know about? |
+1 Seems like this is happening to a bunch of people right now. |
For all users experiencing this right now, please do not respond to this thread. Follow these issues: Edit: temporarily locking to prevent 33+ people from getting pinged for messages until the current issue self-resolves. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
None of the above works. UPDATE: react-scripts test --clearCache Run tests again react-scripts test |
This comment has been minimized.
This comment has been minimized.
It works for me, thanks @errk01 |
Installing babel runtime in CRA environment... Use @thebiltheory suggestion |
This solution worked for me! Thanks @akinorimiz I'm using yarn workspaces in a monorepo. Adding a new dep to one of my packages caused the error others were having running tests. I tried adding @babel/runtime, removing all node_modules, running |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
I don't know what happened exactly, but running `npm add @babel/runtime` and `npm install` before trying again fixed the issue. Source of the fix: facebook/create-react-app#7183 (comment).
I don't know what happened exactly, but running `npm add @babel/runtime` and `npm install` before trying again fixed the issue. Source of the fix: facebook/create-react-app#7183 (comment).
- updated babel core and present env to ^7.1.0 - updated babel runtime and corejs2 to ^7.5.0 - added babel-preset-react-app to devDependencies and edited .babelrc for it - followed facebook/create-react-app#7183
Error Message on the terminal: Cannot find module '/Users/pehhuishi/code/react/practice/react-practice/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/slicedToArray
Not sure why after I installed bootstrap 3 "npm install bootstrap@3.x.x save" I hit the error above. Hope someone can help to resolve. I need to use bootstrap 3 on react.
Thanks for helping !
The text was updated successfully, but these errors were encountered: