Npm.require() is only usable on the server. Why?

Based on and my failed experiments, the client side of a Meteor app cannot use anything from NodeJS.

I really don’t understand why.

I am trying to develop an Electron-based app using the Meteor package Electrify. AFAIK, my client side Meteor app is running on a kind of NodeJS, but sadly I can’t access it and its fs API (that was the reason why I tried to use Electron in the first place).

I don’t understand why there is this limitation, and I don’t understand how to workaround this problem. If anybody can help, it would be great.

ATM this is not possible.
You can try one of the two webpack based projects (look on the forum) that enable this.

Which are those 2 projects? I found one but I don’t know about the other one.

1 Like

You might want to check out too