AZ-400 · Question #342
You scan a Node.js application using WhiteSource Bolt. The scan finds numerous libraries with invalid licenses, but are only used during development. You have to make sure that only production depende
The correct answer is C. npm install. The npm install command will install the devDependencies along other dependencies when run inside a package directory, in a development environment (the default). Use npm install --only=prod (or --only=production) to install only dependencies, and not devDependencies,regardless o
Question
Options
- Anpm edit
- Bnpm publish
- Cnpm install
- Dnpm update
How the community answered
(60 responses)- A5% (3)
- B2% (1)
- C82% (49)
- D12% (7)
Explanation
The npm install command will install the devDependencies along other dependencies when run inside a package directory, in a development environment (the default). Use npm install --only=prod (or --only=production) to install only dependencies, and not devDependencies,regardless of the value of the NODE_ENV environment variable. https://stackoverflow.com/questions/9268259/how-do-you-prevent-install-of-devdependencies- npm-modules-for-node-js-package
Community Discussion
No community discussion yet for this question.