简体   繁体   English

部署到heroku时在node_modules中使用修改后的库

[英]Use modified library in node_modules when deploying to heroku

I am building an app in nodejs and making use of a library called nodify-shopify which is used to interact with the shopify api The library hasn't implemented all the api calls so i had to implement it myself 我在nodejs中构建一个应用程序,并使用了一个名为nodify-shopify的库,该库用于与shopify api交互该库尚未实现所有api调用,因此我必须自己实现

when i push my app to heroku, it doesn't go with the modified library in node_modules so my app breaks 当我将应用程序推送到heroku时,它不与node_modules中的已修改库一起使用,因此我的应用程序中断了

What's the best way to solve this? 解决此问题的最佳方法是什么? I have considered making a pull request, but the project seems abandoned and i need to do this fast. 我曾考虑过提出拉取请求,但该项目似乎已被放弃,我需要快速完成。 I have also considered adding the node_modules to version control, but I'm wondering if there's a better way? 我也考虑过将node_modules添加到版本控制中,但是我想知道是否有更好的方法? I need to get this done fast too, so time is of essence thanks 我也需要尽快完成这项工作,所以时间至关重要

Publish you version of the library somewhere it could be found during the heroku deployment. 将您的库版本发布到在heroku部署过程中可以找到的位置。 Npm supports a variety of possibilities to load node module: Npm支持多种加载节点模块的可能性:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM