1

Senario

I recently upon running an Ionic 3 app, updated (well accidentally) the Ionic CLI version. Now upon running the build from command line, it produces the following error every time and halts the build:

enter image description here

In the error message it says to disable the gulp integration by running the command ionic config set gulp.enabled false which I did. But still getting the same error. I also tried to add the command to the start script of package.json to no avail (not needed though since it seems the config is set globally).

Any help would be appreciated.

Ionic CLI version: 3.9.2

Community
  • 1
  • 1
Ahmad Baktash Hayeri
  • 5,802
  • 4
  • 30
  • 43

1 Answers1

3

Finally figured out what the problem was. Even if Gulp integration has been disabled with the command ionic config set gulp.enabled false, as long as Gulp is a Dev dependency (i.e. there is a reference to it in the package.json under devDependencies) the Ionic CLI would (well, logically) assume that the Ionic project has a dependency on Gulp, therefore would throw the error (see original post).

Solution

The solution for a case where you don't want Gulp integration, apart from disabling it by running the command ionic config set gulp.enabled false, is to also make sure Gulp is NOT under the devDependencies in the package.json file.

Hope this helps anyone else with a similar issue.


NOTE: Not sure from which version onwards Ionic requires integration with Cordova and Gulp in the shape of ionic.config.json file. Anyway, the above solution will be relevant for a similar case in any of those versions.

Community
  • 1
  • 1
Ahmad Baktash Hayeri
  • 5,802
  • 4
  • 30
  • 43
  • 1
    Thanks i had this problem for about 3 days your solution saved me from going on for 4th 5th etc... – Nico Feb 07 '18 at 22:52
  • I have no references to gulp in my package.json and still get the error that gulp is not installed. I have gulp.enabled set to false in my ionic.config.json. – YOOOEE May 14 '18 at 13:02
  • 1
    I resolved my issue by running the following command: ionic config set integrations.gulp.enabled false. Note the introduction of the integrations object. The Ionic error message in the CLI tells you to run ionic config set gulp.enabled false, which did not work for version 3.20.0. – YOOOEE May 18 '18 at 14:16
  • YOOOEE - Your solution (ionic config set integrations.gulp.enabled false) worked for me. – Gail Parsloe Oct 25 '18 at 16:25
  • 2021: None of the solution above worked for me. – Avión Jan 28 '21 at 07:43