Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp build does not install dependencies automatically?

I use gulp to build my javascript application. I have some dependencies declared in the package.json file, for example:

"dependencies": {   "flux": "^2.0.1",   "keymirror": "~0.1.0",   "object-assign": "^1.0.0",   "react": "^0.13.1",   "dropzone": "^4.0.1",   "lodash": "^3.6.0" } 

When I run gulp build, it always prompt me some dependency cannot be found unless I manually run npm install lodash for example.

Is there a way to have gulp run npm install automatically?

like image 301
Gelin Luo Avatar asked Mar 29 '15 05:03

Gelin Luo


People also ask

Does npm install automatically install dependencies?

NPM installs devDependencies within the package. json file. The 'npm install' command should add all the dependencies and devDependencies automatically during installation. If you need to add specific devDependencies to your project, you can use this command- 'npm install --save-dev'.

What is gulp dependency?

This gulp plugin provides a simple API to install dependencies in multiple nested package. json files. It also allows to define custom local dependencies inside package.

Does npm install dependencies of dependencies?

By default, npm install will install all modules listed as dependencies in package.


1 Answers

Run npm install --save-dev command to resolve all dependencies.

Here is link to documentation with --save-dev parameter description: https://docs.npmjs.com/cli/install

like image 138
Alex Avatar answered Sep 19 '22 07:09

Alex