Demeteorizer and node modules

Hi all,

I’m trying to deploy Meteor application to the local Windows server. The application uses ‘events’ and ‘child_process’ modules. Running Meteor I got

Unable to resolve some modules:
“events” in /C/Work/xxxx/imports/api/tools/xxxxx.js (web.browser)
“child_process” in /C/Work/xxxx/imports/api/tools/xxxx.js (web.browser)

If you notice problems related to these missing modules, consider running:
meteor npm install --save meteor-node-stubs

My application works in dev mode, but not when I try to use it after it is ‘Demeteorized’:

Uncaught Error: Cannot find module ‘events’

What can I do about this? I wrote my first Meteor application and now I cannot deploy it…

Thanks,

Alex

Did you meteor npm install --save meteor-node-stubs as instructed?

What do you mean “Demeteorized”? Do you mean you did a build and are deploying the node app directly?

Hi there,
Sure, I did that. I even tried to add these modules (with npm) though they are part of nodejs.
I followed the Detemeorized instructions - built it and run npm install. My application starts but then fails with the above error.

Alex

Sorry I had never heard of demetorizer, assuming that is what you are using. If so, I have no idea…

Yes, that’s the one I tried. Any other ways to deploy on Windows?

meteor build will create a tarball or directory for running the app as a node program.

Hi brucejo,

Thanks for your help. I managed to create a bundle with meteor build and it works now!

Alex

1 Like