Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
558 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...