I'm trying to help a remote coworker install gulp on Windows so he can compile one of our JavaScript projects locally. An employee before me has been trying to help this remote coworker for over a year before I got here to little avail, so there may be some crud left over from that time at the root of the issue, but I've done what I thought to be a reasonable start from scratch and I continue to have the same problem.
I've sent him the project folder exactly cloned as I have it, minus the node_modules folder. I had him uninstall and reinstall Node first using the first three steps of this answer followed by redownloading the MSI from NodeJS.org to reinstall fresh. Then, in the working directory, I had him run
PS C:\Users\Coworker\Path\To\Project>npm ci
to install gulp. gulp and its various extensions are the only modules in the package.json folder, and the package-lock.json is simply the result of us successfully installing these packages recently. Contents of package.json
:
{
"devDependencies": {
"gulp": "^4.0.0",
"gulp-coffee": "latest",
"gulp-concat": "latest",
"gulp-concat-sourcemap": "latest",
"gulp-connect": "latest",
"gulp-minifier": "latest",
"gulp-minify-css": "latest",
"gulp-remove-logging": "latest",
"gulp-resolve-dependencies": "latest",
"gulp-sass": "latest",
"gulp-uglify": "latest",
"gulp-util": "latest",
"gulp-watch": "latest",
"gulp-wrap": "latest"
},
"dependencies": {
"natives": "^1.1.6"
}
}
I also had him uninstall and reinstall gulp-cli
globally.
npm uninstall --global gulp gulp-cli
npm install --global gulp-cli
Running gulp --version
displays the correct, expected output:
PS C:\Users\Coworker\Path\To\Project>gulp --version
CLI version: 2.2.0
Local version: 4.0.0
This matches the output on my Windows machine, where everything works fine.
When we finally have him run gulp
in the project directory, it simply gives:
PS C:\Users\Coworker\Path\To\Project> gulp
No gulpfile found
The only helpful question already on Stack Overflow for this is here, and every answer there is some form of "add a gulpfile". But there is a gulpfile.js in the working directory. It has the correct name and file extension. It is formatted properly. It's an exact duplicate of the file in my own local directory, which when I run the same command, it gulps flawlessly. What could be causing gulp to not recognize the gulpfile is present? Could gulp be misconfigured and trying to run with a different working directory, despite the directory it is being called in? How can I troubleshoot this?