yes
yes
react-scripts
build
node -v: v8.9.0npm -v: 5.5.1yarn --version (if you use Yarn):npm ls react-scripts (if you haven鈥檛 ejected): [email protected]
Operating system: Ubuntu 16.04 LTS
after build, serve is expected to serve the built version
it's serving the original react template, a version that doesn't exist!
tried it with a multiple create-react-app projects, the same always happens
Tried to verify on Windows 10, node 9.1.0 (all other versions same). Cannot reproduce.
@SirajKakeh can you please check a couple of things which may help others narrow down the problem?
is npm run build creating the build directory in your project? (may be try deleting your build directory first)
Clear chrome cache or try in in-private mode (in case chrome has cached the earlier response)
Edit: Also, just noticed that you are serving by: serve build but without the -s switch as the message from CRA suggests. I am not sure if that makes a difference with Serve, but can you please try that first?
@Dubes
cleared the chrome cache and it worked thanx :+1: .
Tried to open the build version on firefox and it showed the changed version, but whenever I build a newer version I always have to clear the browsers cache on whichever browser I use first
You might be having issues with the service worker caching your builds. Try refreshing after a change, the new build should show up, no need to clear your cache. Also, you can opt out of caching as the build is run in the context of production by default. You shouldn't have this problem during development.
Most helpful comment
You might be having issues with the service worker caching your builds. Try refreshing after a change, the new build should show up, no need to clear your cache. Also, you can opt out of caching as the build is run in the context of production by default. You shouldn't have this problem during development.