What maybe the problem about jpg file?

Feb 18 09:05:58 PM ==> Cloning from GitHub - Shubham-S-Lahase/MERN-Blog-App-FrontEnd
Feb 18 09:05:59 PM ==> Checking out commit 9e6f9e99cc6f0192a375b49a58edb7c82fb896ea in branch master
Feb 18 09:06:04 PM ==> Installing dependencies with npm…
Feb 18 09:06:57 PM
Feb 18 09:06:57 PM > core-js@3.27.1 postinstall /opt/render/project/src/client/node_modules/core-js
Feb 18 09:06:57 PM > node -e “try{require(‘./postinstall’)}catch(e){}”
Feb 18 09:06:57 PM
Feb 18 09:06:57 PM
Feb 18 09:06:57 PM > core-js-pure@3.27.1 postinstall /opt/render/project/src/client/node_modules/core-js-pure
Feb 18 09:06:57 PM > node -e “try{require(‘./postinstall’)}catch(e){}”
Feb 18 09:06:57 PM
Feb 18 09:06:58 PM added 1483 packages from 715 contributors and audited 1484 packages in 54.15s
Feb 18 09:06:59 PM
Feb 18 09:06:59 PM 233 packages are looking for funding
Feb 18 09:06:59 PM run npm fund for details
Feb 18 09:06:59 PM
Feb 18 09:06:59 PM found 2 vulnerabilities (1 moderate, 1 high)
Feb 18 09:06:59 PM run npm audit fix to fix them, or npm audit for details
Feb 18 09:07:08 PM audited 1484 packages in 7.833s
Feb 18 09:07:08 PM
Feb 18 09:07:08 PM 233 packages are looking for funding
Feb 18 09:07:08 PM run npm fund for details
Feb 18 09:07:08 PM
Feb 18 09:07:08 PM found 2 vulnerabilities (1 moderate, 1 high)
Feb 18 09:07:08 PM run npm audit fix to fix them, or npm audit for details
Feb 18 09:07:18 PM ==> Using Python version: 3.7.10
Feb 18 09:07:21 PM ==> Running build command ‘npm run build’…
Feb 18 09:07:22 PM
Feb 18 09:07:22 PM > client@0.1.0 build /opt/render/project/src/client
Feb 18 09:07:22 PM > react-scripts build
Feb 18 09:07:22 PM
Feb 18 09:07:23 PM Creating an optimized production build…
Feb 18 09:07:26 PM Failed to compile.
Feb 18 09:07:26 PM
Feb 18 09:07:26 PM Module not found: Error: Can’t resolve ‘./mypic.jpg’ in ‘/opt/render/project/src/client/src/components/Aside’
Feb 18 09:07:26 PM
Feb 18 09:07:26 PM
Feb 18 09:07:26 PM npm ERR! code ELIFECYCLE
Feb 18 09:07:26 PM npm ERR! errno 1
Feb 18 09:07:26 PM npm ERR! client@0.1.0 build: react-scripts build
Feb 18 09:07:26 PM npm ERR! Exit status 1
Feb 18 09:07:26 PM npm ERR!
Feb 18 09:07:26 PM npm ERR! Failed at the client@0.1.0 build script.
Feb 18 09:07:26 PM npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Feb 18 09:07:26 PM
Feb 18 09:07:26 PM npm ERR! A complete log of this run can be found in:
Feb 18 09:07:26 PM npm ERR! /opt/render/.cache/_logs/2023-02-18T15_37_26_918Z-debug.log
Feb 18 09:07:26 PM ==> Build failed :disappointed:

Hey there,
You’ve handily included the GitHub repo there and it’s public.

Feb 18 09:07:26 PM Module not found: Error: Can’t resolve ‘./mypic.jpg’ in ‘/opt/render/project/src/client/src/components/Aside’

Is the error so the first thing to do is to head to that path in the repo

https://github.com/Shubham-S-Lahase/MERN-Blog-App-FrontEnd/tree/master/client/src/components/Aside

anything jump out at you?

All our servers run Linux which is a case-sensitive file system so your reference to mypic.jpg doesn’t actually exist, it’s mypic.JPG - of course, the easiest way to avoid this cropping up is just to keep everything lowercase moving forwards

John B

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.