riddhi2
December 12, 2024, 9:53am
1
App.js
import "./App.css";
import React, {Component} from "react";
import AppRoutes from "./Navigations";
import { StreamStatusProvider } from "./StreamStatusContext";
function App() {
return (
<StreamStatusProvider>
<AppRoutes />
</StreamStatusProvider>
)
}
export default App;
Ray13
December 12, 2024, 10:57am
2
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
lasjorg
December 12, 2024, 4:20pm
3
Post a repo and provide more information.
Likely an issue with one of your dependencies.
opened 04:16PM - 20 Dec 21 UTC
closed 05:30PM - 23 Dec 21 UTC
needs triage
issue: bug report
### Describe the bug
Morning, i upgraded my project to react-scripts V5 and n… ow the console is showing many logs about this
`ERROR in ./src/services/store/actions/index.js 1:40-119
Module not found: Error: You attempted to import .../node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
@ ./src/services/store/reducers/index.js 14:0-40 27:9-19
@ ./src/services/store/index.js 8:0-34 38:28-36
@ ./src/index.js 13:0-40 22:9-17
ERROR in ./src/services/store/actions/sharedStore/index.js 1:40-119
Module not found: Error: You attempted to import .../node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
@ ./src/services/store/reducers/sharedStore/index.js 4:0-86 11:9-26 16:9-31
@ ./src/services/store/reducers/index.js 13:0-47 65:21-39
@ ./src/services/store/index.js 8:0-34 38:28-36
@ ./src/index.js 13:0-40 22:9-17
ERROR in ./src/services/store/index.js 1:40-119
Module not found: Error: You attempted to import .../node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
@ ./src/index.js 13:0-40 22:9-17
`
### Did you try recovering your dependencies?
yes, i deleted node_modules and yarn.lock and nothing
### Which terms did you search for in User Guide?
react-refresh runtime error
### Environment
yarn version = 1.22.5
node version = 16.13.0
react version = 18.0.0-rc
### Steps to reproduce
1. installed new version
2. yarn start (react-scripts start)
3. console full of errors
### Expected behavior
the project should works like the previous version
### Actual behavior
ERROR in ./src/services/store/actions/index.js 1:40-119
Module not found: Error: You attempted to import .../node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
@ ./src/services/store/reducers/index.js 14:0-40 27:9-19
@ ./src/services/store/index.js 8:0-34 38:28-36
@ ./src/index.js 13:0-40 22:9-17
ERROR in ./src/services/store/actions/sharedStore/index.js 1:40-119
Module not found: Error: You attempted to import .../node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
@ ./src/services/store/reducers/sharedStore/index.js 4:0-86 11:9-26 16:9-31
@ ./src/services/store/reducers/index.js 13:0-47 65:21-39
@ ./src/services/store/index.js 8:0-34 38:28-36
@ ./src/index.js 13:0-40 22:9-17
ERROR in ./src/services/store/index.js 1:40-119
Module not found: Error: You attempted to import .../node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
@ ./src/index.js 13:0-40 22:9-17
### Reproducible demo
If you are using CRA I would suggest switching to Vite instead.