Home > Mobile >  Can't install gulp
Can't install gulp

Time:11-18

When I want to reinstall my developer environment, I have some issues with gulp.

npm install gulp-cli -g
npm : npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
At line:1 char:1
  npm install gulp-cli -g
  ~~~~~~~~~~~~~~~~~~~~~~~
      CategoryInfo          : NotSpecified: (npm WARN deprec...-url#deprecated:String) [], RemoteException
      FullyQualifiedErrorId : NativeCommandError
 
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated

I have tried to install different Node version with NVM and I have this issue on all the node versions.

nvm list

    14.15.0
    14.6.0
    12.13.1
    12.13.0

Is there a way to resolve this issue, so I could have an SPFX developer environment again?

CodePudding user response:

As stated above, what you are showing is a deprecation warning, so gulp-cli should be installed. Use the following to see if gulp-cli is installed:

npm ls -g --depth=0

which should report the version of gulp-cli.

You can also run

gulp -v

This will return the "CLI version:" and "Local version:" of gulp. The local version will be listed as Unknown unless your are in the folder with a SPFx project where "npm i" has been run, where Gulp commands will also be available (gulp build, gulp serve, etc.)

Hope this helps.

CodePudding user response:

After further investigation, I figured out that gulp wasn't installed because of an error with NVM.

NVM wasn't showing which version I was using, and also not changing the version.

To fix this

I had to delete the folder located at C:\Program Files\nodejs

And then run NVM use {version} Install gulp-cli again and now Gulp is installed

  • Related