Gulp command not found after install

前端 未结 11 1518
抹茶落季
抹茶落季 2021-01-30 01:54

I installed gulp(globally) and it looks like it worked because it ran this code:

├── tildify@0.2.0
├── interpret@0.3.5
├── pretty-hrtime@0.2.1
├── deprecated@0.0         


        
11条回答
  •  青春惊慌失措
    2021-01-30 02:33

    I had similar problem I did the following steps and it worked.Go to mac terminal and execute the commands,

    1.npm config set prefix /usr/local

    2.sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

    This two commands will set the npm path right and you no longer have to use sudo in npm. Next uninstall the gulp

    1. npm uninstall gulp

    2. Installl gulp again without sudo, npm install gulp -g

    This should work!!

提交回复
热议问题