Homestead中安裝yarn教程

2021-08-10 16:24:48 字數 1318 閱讀 7423

網路原因,

將 npm 源切換至**源

vagrant@homestead

:~/code/larabbs

$ npm config set registry

將 yarn 源切換至**源

vagrant@homestead

:~/code/larabbs

$ yarn config set registry

vagrant@homestead

:~/code/larabbs

$ yarn config set sass-binary-site

/node-sass

1 . 在專案根目錄下,使用 yarn 安裝依賴:

2 . 安裝成功後,執行以下命令即可:

vagrant@homestead

:~/code/larabbs

$ npm run watch-poll

可以在執行命令的後面接乙個&命令就會在後台執行了。完整命令:npm run watch-poll &

如果已經直接執行了npm run watch-poll,可以直接按ctrl + z,將程式掛到後台,然後會看到乙個任務號,如:[1]+ stopped npm run watch-poll,再執行:bg 1就相當於上述第一條解決辦法。 [1]這方括號裡的1就是任務號

如果安裝失敗,重新安裝

vagrant@homestead:~/code/larabbs$ yarn config set registry 

.taobao

.org

vagrant@homestead

:~/code/larabbs

$ yarn install

Homestead 安裝 PHP Redis 擴充套件

最近在使用 vagrant 安裝 homestead 後,執行 時提示 redis 對應的 class 不存在,其實是缺少對應的 php redis 擴充套件,在安裝的過程中遇到不少坑,記錄到這篇文章裡了git clonecd phpredis usr bin phpize5.6 不同php版本的情...

homestead安裝swoole擴充套件

配置好ubuntu的國內映象源並更新 檢視php版本,並安裝對應php版本的dev sudo apt install php7.2 dev配置pecl sudo pecl channel update pecl.php.net sudo pear clear cache sudo pear upda...

mac php安裝 yar擴充套件

前置brew,php這個略過。進入到安裝包內 這個是自己的php路徑 usr local cellar php 7.4 7.4.13 1 bin phpize 重點,指定php配置目錄和curl目錄,在mac上安裝yar擴充套件不指定curl目錄會報錯 configure with php conf...