-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
_9 Upvotes_ ## Summary
When running Meteor from npm's scripts-block a node process eats >100% CPU.
Details
There is a nice way of using npm's package.json
file to save characters when starting Meteor with lots of options for development. Described in detail here,
Basically, Meteor can be started with $ npm start
by including a file (called package.json
) like the one below in the Meteor app.
{
"name": "todos",
"scripts": {
"start": "meteor run"
},
"private": true
}
When running Meteor with $ npm start
everything works as usual. But after letting it run for about 1,5minutes, the fans on my MacBook Pro go crazy. The cause of this is that a node process takes up more than 100% CPU and nearly 200M memory.
Reproduction
The reproduction repository contains the plain todos example. I only added a package.json
file.
$ git clone git@github.com:dferber90/meteor-npm-issue.git
$ cd meteor-npm-issue
$ npm start
# now, view %CPU and MEM of a node process in a new terminal tab
$ top
When running the same app with the plain old $ meteor run
command instead of $ npm start
, everything works fine. I am not sure what is causing this.