Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to split gulpfile #2255

Comments

@ZebraFlesh
Copy link

What were you expecting to happen?
Following the directions for splitting a gulpfile, I created a folder in the root of my repo called "gulpfile". I then moved my currently working ./gulpfile.js to ./gulpfile/index.js. Running gulp (via npx gulp), I would expect gulp to find the index.js file and execute the default task.

What actually happened?
Gulp reports No gulpfile found

What version of gulp are you using?
4.0.0

What versions of npm and node are you using?
npm: 6.4.1
node: 10.12.0

I'm not sure if this is a bug in the documentation or a bug with gulp-cli, so I figured I would start here.

@phated
Copy link
Member

phated commented Oct 25, 2018

Don't run gulp with npx. That's not a tested or supported pattern.

@ZebraFlesh
Copy link
Author

Changed to a global installation (npm i -g gulp@next) and still the same result: No gulpfile found

@phated
Copy link
Member

phated commented Oct 26, 2018

Why are you installing gulp@next globally? Install the CLI as documented at https://gulpjs.com/docs/en/getting-started/quick-start

@phated
Copy link
Member

phated commented Oct 26, 2018

@ZebraFlesh besides those issues, I did actually find a typo in the documentation. It's supposed to say that the directory is named gulpfile.js - sorry for the confusion.

@phated phated closed this as completed in 96c353d Oct 26, 2018
@ZebraFlesh
Copy link
Author

Global installation: I had missed that part of the upgrade instructions, thank you for pointing it out.

And thanks for the doc change, works great now!

@phated
Copy link
Member

phated commented Oct 26, 2018

No problem! Thanks for bringing it to our attention.

(Btw, the reason we don't recommend npx is because the "correct" CLI bin is shipped with gulp-cli which would make the command npx -p gulp-cli gulp which is pretty awkward)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment