Meteor React main.html missing

I have a React Meteor installation and now trying to run meteor build to try to deploy it.

This is how I run it:

meteor build --directory /path/to/some/dir --architecture os.osx.x86_64 

It produces the following output:

bundle/
├── README
├── main.js
├── programs
│   ├── server
│   │   ├── app
│   │   ├── boot-utils.js
│   │   ├── boot-utils.js.map
│   │   ├── boot.js
│   │   ├── boot.js.map
│   │   ├── config.json
│   │   ├── debug.js
│   │   ├── debug.js.map
│   │   ├── mini-files.js
│   │   ├── mini-files.js.map
│   │   ├── node_modules
│   │   ├── npm
│   │   ├── npm-rebuild-args.js
│   │   ├── npm-rebuild-args.js.map
│   │   ├── npm-rebuild.js
│   │   ├── npm-rebuild.js.map
│   │   ├── npm-rebuilds.json
│   │   ├── npm-require.js
│   │   ├── npm-require.js.map
│   │   ├── npm-shrinkwrap.json
│   │   ├── package.json
│   │   ├── packages
│   │   ├── profile.js
│   │   ├── profile.js.map
│   │   ├── program.json
│   │   ├── runtime.js
│   │   ├── runtime.js.map
│   │   ├── server-json.js
│   │   └── server-json.js.map
│   ├── web.browser
│   │   ├── 022bfd4920588b40bec6ce1acdf12cc4921ee22c.js
│   │   ├── 022bfd4920588b40bec6ce1acdf12cc4921ee22c.stats.json
│   │   ├── 1a07fec0f59528ea682d7def7712f08febf81489.css
│   │   ├── body.html
│   │   ├── head.html
│   │   └── program.json
│   └── web.browser.legacy
│       ├── 1a07fec0f59528ea682d7def7712f08febf81489.css
│       ├── b9ad287afa601d54eeb7ead9e036169b0cfc1676.js
│       ├── b9ad287afa601d54eeb7ead9e036169b0cfc1676.stats.json
│       ├── body.html
│       ├── head.html
│       └── program.json
├── server
└── star.json

My expectation is the following. I assume I will need to start Meteor server based on instructions from README and then I will need to have main.html file which will be my entrypoint for Apache or Nginx to have React application running. However, I cannot find main.html in web.browser folder. The only .html files I can find is body.html and head.html. Am I missing some important concept of Meteor?

Also, what is the proper way of running React application with Meteor on production?

Btw, here is the application structure, it is pretty default:

├── client
├── imports
├── node_modules
├── package-lock.json
├── package.json
├── server
└── tests

Hi, the best way for you to deploy your app is using Meteor Cloud Meteor Cloud: The Only Full-Service Cloud Offering for Meteor Apps.

You can see more here Deploy quickstart | Galaxy Docs

@filipenevola What if one wants to run the thing on their hardware?

@ateshabaev I use meteor-up.

Sure you do it like this bro

  • Build your app: meteor build ../build --architecture os.linux.x86_64
  • Deploy it: scp ../build/app.tar.gz user@server:~/
    • (Optional Backup to instant rollback): sudo cp -R bundle bundle-backup/
  • Unpack it on server: tar -zxf app.tar.gz
  • cd into bundle directory and run install: (cd programs/server && npm install)
  • Run: node main.js (do this inside a screen and dettach ctrl+a d it so it runs in the background with screen and doesn’t close)

For first time configuration, you just tell nginx to run localhost:your-port as the upstream and export shell variables:

  $ export MONGO_URL='mongodb://user:password@host:port/databasename'
  $ export ROOT_URL='http://example.com'
  $ export MAIL_URL='smtp://user:password@mailhost:port/'

That’s it. This is the official directions given in the included bundle/README when you build the app

1 Like

Yes, meteor-up is a nice choice in this case