Note: This is based on https://github.com/andrevesdickow/nextjs-lerna
Install NVM
Install Node.js and Lerna
nvm use
npm install --global lerna
Start backend and frontend
yarn start:backend & yarn start:frontend
Reference: https://yarnpkg.com/getting-started/qa#how-to-share-scripts-between-workspaces
Create new workspace package in frontend
cd packages && yarn create next-app mypackage
Add a package to frontend
yarn add dotenv