Meteor more than 10 mins to build

Meteor takes more than 10 mins to build. If I make a simple change it just hangs on the refresh. This is on a windows 10 machine. What could I doing wrong?
Based on the recommendation here, how should I remove the meteor-node-stubs package to check if that helps?

Here’s my package.json

{
“name”: “simple-todos-react”,
“private”: true,
“scripts”: {
“start”: “meteor run”,
“test”: “meteor test --once --driver-package meteortesting:mocha”,
“test-app”: “TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha”,
“visualize”: “meteor --production --extra-packages bundle-visualizer”
},
“dependencies”: {
@babel/runtime”: “^7.5.5”,
“bcrypt”: “^3.0.0”,
“classnames”: “^2.2.6”,
“meteor-node-stubs”: “^0.4.1”,
“react”: “^16.9.0”,
“react-dom”: “^16.9.0”,
“simpl-schema”: “^1.5.5”
},
“meteor”: {
“mainModule”: {
“client”: “client/main.js”,
“server”: “server/main.js”
},
“testModule”: “tests/main.js”
},
“devDependencies”: {
“chai”: “^4.2.0”
}
}

Sometimes there is an issue with old packages version doing some funky stuffs…
Try a meteor reset if you can drop the local MongoDB
If that does not solve it, try to re-install Meteor
First remove the ~/.meteor directory and run the install script.
curl https://install.meteor.com/ | sh
:crossed_fingers:

I think the best approach today is to use WSL2 and VSCode remote so all the development happens on the linux side. I haven’t yet tried it though.

The other advice I always give is to add exceptions to windows defender:

But sadly, the windows experience for Meteor (and most node apps) is not good

2 Likes

A colleague of mine runs Meteor on Windows. It might be that Windows scans all the files for viruses whenever it installs something new. After that, rebuilds are faster.

When we update, it can take 1+ hours.

Thank you @jonlachlan, @coagmano for your response.
I have made the changes suggested above and they have helped the build process be faster. I however still see several times that the application is stuck at “client modified-refreshing” step. Is there a way to debug what might be causing this issue? I did try to search the forums but did not really get much.

The larger your application, the longer the build times. It’s inevitable. Be happy that you can do so much in under 10 minutes. Old school programmers had to deal with 4 - 8 hr compile times to do basic things like compile a Linux kernel back in the 90s. Learn to time-sequence your tasks, and go fix food or clean the apartment or do exercises while your app is compiling. If you do laundry and put the dishwasher on at the same time as your app is compiling, you’ll be doing 3x multitasking. Think of it as a feature, not a flaw. You’ve set up an automation task that takes the computer 10 minutes to finish!

4 Likes

Personally I go for 1x optimization – if my computer is occupied, I do nothing.

2 Likes

Thank you @awatson1978, @jonlachnlan, this is a simple todo newbie application, The issue is now fixed based on the changes given here.

2 Likes

I had created my app based on vue-meteor-demo, in this the ui folder was in the imports folder directly. moving the ui folder to under the client folder improved the build time of my application tremendously. i am using windows 10.

1 Like