Loading

Quipoin Menu

Learn • Practice • Grow

node-js / package-lock.json Explained
mcq
Direction: Choose the correct option

Q1.

What is the purpose of `package-lock.json`?
A. To list development dependencies
B. To store user passwords
C. To replace `package.json`
D. To lock the package versions for reproducible installs
Direction: Choose the correct option

Q2.

Should `package-lock.json` be committed to version control?
A. Yes, to ensure consistent installs across environments
B. Only for applications
C. No, it's auto-generated
D. Only for libraries
Direction: Choose the correct option

Q3.

What does `package-lock.json` contain?
A. Only the dev dependencies
B. Only the direct dependencies
C. The exact version and integrity hash of every dependency
D. The project metadata
Direction: Choose the correct option

Q4.

When is `package-lock.json` updated?
A. Every time you run Node.js
B. Whenever `npm install` modifies `node_modules`
C. Once a month
D. Manually
Direction: Choose the correct option

Q5.

If `package-lock.json` exists, what does `npm install` do?
A. Deletes `node_modules` first
B. Prompts for confirmation
C. Ignores `package.json` and installs from lock file
D. Installs latest versions