Demeteorizer and node modules


#1

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


#2

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?


#3

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


#4

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


#5

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


#6

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


#7

Hi brucejo,

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

Alex