I keep getting this error after I deploy my app with npm run preview and when I deploy through Vercel. I get no error when the app is "building"
The problem isn't the .env variables being used in Vercel's environment as it successfully builds.
The problem is somewhere in my code as it also happens in localhost when previewing.
npm run dev works fine.
I have also rebuilt my app as well - meaning I started a new sveltekit project, reinstalled supabase and set everything up from scratch and still no luck.
Related
I've been trying to deploy the default shopify rails+react app generated via shopify cli
Deployment is successful but the UI doesn't get rendered. I get a blank screen with the message "This app does not appear to be loading and may be outdated. Try reloading the app in the legacy admin or contact the app's developer to update the app."
The same issue persists when I load the app in legacy admin (.myshopify.com/admin instead of admin.myshopify.com/)
For now, I've tried the following:
Running the Dockerfile locally
Run all commands from Dockerfile locally - bundle install, npm install, rake build:all and rails server -b 0.0.0.0 -e production
Deploy the app to production on cloud66 (which runs the default Dockerfile)
All 3 have the same issue. Don't see any errors in Rails logs as well.
Can anyone help please?
Turns out I missed RAILS_SERVE_STATIC_FILES flag as mentioned here. Not sure why it needs to be added explicitly, but it worked after I added it!
I am building a full-stack app with React for the frontend and Express for the backend. I tested everything in localhost, it is working fine. After I did "npm run build" in the frontend, I tried to test it, it gave me an error that I did not have in development mode, only have error in production mode.
The error is "this.state.books.map is not a function". I read some Stack overflow posts, someone said it might be a JSX problem, he suggested changing "this.state.books.map" to "const books = this.state.books", and then do "books.map" in the render. I changed that, everything works fine in development mode, I deleted the old build folder and created a new one after I had changed the codes and tested in localhost but still has the same problem in production mode.
Please help me to figure out what wrong.....
I have a router-based react app and when I run npm run build on my machine and serve it, it works fine
But when I deploy it to Netlify or Vercel, it doesn't work, just a blank page. When I view the source code, there is almost nothing there as well.
What is going on?
I have an issue with AMP CDN. It has been integrated into Nextjs as I use the AMP feature in Nextjs itself, it was working fine yesterday but today the following error came up:
This crash occurs when Next.js cannot load cdn.ampproject.org. For solving this problem first Check the network connection then you must necessarily restart the next.js server or dev server.
npm run dev
or
npm run start
Is it possible to build react app for production using npm run build without it making the site offline? I am using nginx to serve the react app and when I run the above command, I get Internal server error until the build is finished. It would be nice if the old version of the app is served until the build is finished.
You shouldn't be building your application on the production server. Build it locally, then deploy it to production and this won't be an issue.