I have a project that uses Gulp. I deployed my project on my Ubuntu server and now I want to compile the assets (at the moment this is all my gulpfile). After installing Node and npm, I run npm install from my project root to install the dependencies. The .json package reads as follows:
...}, "devDependencies": { "bower": ">=1.3.12", "gulp": "^3.8.10", "gulp-concat": "^2.4.3", "gulp-less": "^2.0.1", "gulp-minify-css": "^0.4.3", "gulp-notify": "^2.2.0", "gulp-rename": "^1.2.0", "gulp-uglify": "^1.1.0" }...
After checking the node_modules folder in the root of my project, I can see the directories for each of the dependencies indicating that they were installed. However, when I run gulp , I get npm errors, such as:
Error: Cannot find module 'through2' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17)
It seems like they depend on the dependencies of my project (since they are not mentioned in my gulpfile), but why did not npm install them?
I can manually install each of them because an error occurs, but then I get another similar error for the next missing dependency.
How can i solve this?
source share