Search code examples
node.jsnpmgulpspfx

Can't install gulp


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?


Solution

  • 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