# You'll need to use npm 14, which on m1 mac requires switching architectures
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
$env /usr/bin/arch -x86_64 /bin/zsh
arch
> i386
# Sometimes items in the public folder can cause issues. Fully remove it.
rm -r public
rm -r packages/personal-blog-lite/public
mkdir packages/personal-blog-lite/public
# fully remove yarn and node modules in case there were any preexisting
rm yarn.lock
rm yarn-error.log
rm -rf node_modules
rm package-lock.json
# puppeteer can cause mysterious issues. It's best to set its download host before doing anything, really.
PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors
# install packages
yarn install
PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors
yarn dev
PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors
gatsby clean
yarn build
yarn deploy
in the StoryHub folder,
yarn
In case building starts throwing mysterious src errors, try just reinstalling all packages, removing the public directory, and gatsby cleaning
rm yarn.lock
rm yarn-error.log
rm -rf node_modules
rm package-lock.json
yarn install
rm -r public
rm -r packages/personal-blog-lite/public
mkdir packages/personal-blog-lite/public
git clean -xdf
yarn install
gatsby clean
yarn build
gatsby serve
yarn deploy
yarn add -W gatsby-plugin-matomo
Installing Fonts
yarn dev
## Inside of personal-blog-lite
yarn preload-fonts
NOTE:
PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors
or
sudo npm install puppeteer --unsafe-perm=true --allow-root