Skip to content

Unable to split gulpfile #2255

Closed

Description

@ZebraFlesh

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.

Activity

  1. phated commented on Oct 25, 2018

    @phated
    Member

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

  2. ZebraFlesh commented on Oct 26, 2018

    @ZebraFlesh
    Author

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

  3. phated commented on Oct 26, 2018

    @phated
    Member

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

  4. phated commented on Oct 26, 2018

    @phated
    Member

    @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.

  5. ZebraFlesh commented on Oct 26, 2018

    @ZebraFlesh
    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!

  6. phated commented on Oct 26, 2018

    @phated
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions