react-scripts v4.0.0 causes local images to not load
See original GitHub issueDescribe the bug
Upgrading from v3.4.4 to v4.0.0 (using npm install react-scripts@latest
) causes my local images (using src={require("../../assets/images/logo/logo-v4.png")}
) to not load, however external images load. (see StackOverflow post here ) Fixed by simply downgrading to v3.4.4.
Environment
Tested using MacOS Catalina v10.15.7 and Windows 10 on Chrome Version 86.0.4240.111
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:31 (2 by maintainers)
Top Results From Across the Web
React.js project local images suddenly stopped loading
0.0, so I downgraded to v3.4.4, and the local images loaded properly. I will open an issue on the react-scripts GitHub page!
Read more >"The NPM script 'start' exited without indicating that the create ...
When I try to run my project I always get this error: 181477-image.png. I've tried everything I've seen online, and it still fails....
Read more >Fixing create-react-app when npm fails to start because your ...
This causes npm start to fail in my Create React App folder. Attempting to bind to HOST environment variable: x86_64-apple-darwin13.4.0. Error: getaddrinfo ...
Read more >The React Scripts Start Command – Create-React-App NPM ...
These build tools are required because React's JSX syntax is a language that the browser doesn't understand. To run your React application, ...
Read more >create react app env variables not loading - You.com
You need to integrate variable with start script. "scripts": { "start" ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
try
const logov4 = require("../../assets/images/logo/logo-v4.png").default
orimport logov4 from "../../assets/images/logo/logo-v4.png"
Issue still there