Deploy customized Node.js module on Heroku

我的梦境 提交于 2019-12-13 08:35:52

问题


I have installed the drupal-node.js module by running npm install command. And then I go inside drupal-node.js in node_modules folder and done place another module inside it.

To run my above Node.js app, I have to go inside node_modules folder and in drupal-node.js and I run node app.js.

Now, I have to deploy my above Node.js app to Heroku. But I think Heroku doesn't allow us to make changes in the node_modules/ folder.

How can I use my local update on Heroku?


回答1:


I can't think of a single situation where you should be directly modifying anything in node_modules/. If you really need to modify a library, submit your change to the library maintainers.

If that's not an option for whatever reason, fork the library and install from your fork using yarn or npm.

Forking a library shouldn't be done lightly. By doing this you're adding a maintenance burden to your project. Now, in addition to your own code, you need to maintain your fork. Pulling updates in from upstream so you can take advantage of bug fixes and security updates is important.



来源:https://stackoverflow.com/questions/55610759/deploy-customized-node-js-module-on-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!