Node.js · Junior · Question 29 of 75

Should node_modules be committed to git?

Explanation

node_modules is large and platform-specific (native modules). Anyone can recreate it exactly from the lock file with npm ci.

Further reading

Problem with a question

Node.js · Junior · question 29

Test yourself

Take the Node.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz