I am a beginner programmer. I have created a web app using Expo. I have used node.js (or Javascript, I’m not sure how to know which I am using) as my programming language. I have been using Expo Go to develop the app. Now, I want to make the app available for users to use, so that I can see if it is working properly. I know there is a thing such as a “development build” and “production build” (not really sure what those are).
Apparently I need to do “npm run build” before deploying my app on Vercel. So, I tried that command, but it keeps producing errors. I updated my expo and a bunch of other packages and dependencies. But, “npm run build” still isn’t working. I tried some command like “npx expo build:web”, but it responds by saying that this command doesn’t work with the local cli and that I need to use some command like “npx expo export:web”. When I try that command, it says that I need to set up Webpack in order to use that command. I’ve tried setting up Webpack, but I can’t figure it out (I’ve tried various ways to make the webpack.config.js file); it keeps giving errors (sometimes up to 90 errors and over 200 warnings!).
I tried just skipping this npm run build stuff and just going for the vercel deployment stuff. But when I did “vercel –prod”, it seemed to deploy the app and provided a url for the app. When I opened the url, it gave an error called “404: NOT_FOUND”.
I don’t really know what I’m doing. Any help would be greatly appreciated! Thank you for your time.
I have tried things like:
- npm run build
- npx expo build
- npx expo export:web
- Setting up Webpack; various configurations of webpack.config.js
- vercel –prod
- Updating or downgrading installed packages and dependencies.
- Editing the scripts of package.json
The results have primarily been some sort of error(s).
Arman Mian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.