Where do we put node modules we install by npm in a Meteor project?

前端 未结 6 525
攒了一身酷
攒了一身酷 2020-12-08 03:33

I followed the github meteorirc project\'s lead and put them in /public/

I installed my node modules via npm from inside /public/ and therefore I have a /public/node

6条回答
  •  抹茶落季
    2020-12-08 04:04

    Meteor takes lib/node_modules from the development bundle and makes a symbolic link or copies it to server/node_modules, which is in the hidden .meteor sub folder under your project.

    So, if you cd into the lib directory of the development bundle or into server directory of the .meteor folder (I believe it is in build); you will be able to use the node modules. If you have trouble loading them, you might want to check out this question.

提交回复
热议问题