Meteor 2.3.2 - Error: Cannot find module 'reify/lib/runtime'

I’m simply running:

meteor create test
cd test
meteor bundle ~/test-bundle --directory --server-only
cd ~/test-bundle/bundle
meteor node main.js

It happens both locally (osx) and remote (linux x64).

Perhaps I’m missing something, but I would expect this to run without the reify exception. Is this new to 2.3.2 and the server-side reify cache integration?

Need to see the error to be able to help you more

You have to npm install on bundle/program/server

Also, I believe this is deprecated in favor of meteor build

Thanks for your help. Aha, I meant to paste meteor build not meteor bundle - it’s been a bit and also I didn’t realize that npm install was mandatory post build.

Also, apologies for the confusion - the exception is in the title (Error: Cannot find module 'reify/lib/runtime') - without running npm install, this is what I get when attempting to meteor node main.js.

What’s confusing is why the build seems to have node_modules already without any npm install. Do you happen to know the purpose the bundle contains bundle/programs/server/npm/node_modules?

Thanks.

We were discussing that in another thread. Will post here once I find them

Oh, you were part of the discussion.

1 Like

Right - thanks for following up. Understanding that /npm directory would certainly help understand the meteor build process more. Years ago, I thought meteor build (or bundle) would produce a one-off tarball that required no additional modification prior to running node main.js inside of it.

npm packages aren’t included in the build because many have binaries and there’s no guarantee you will be on the same arch as the system you deploy to. If you build on Mac or Windows and then deploy to Linux, any binary dependencies will not run.

Open the tarball and check the README it’s all there bud