personal monorepo containing different apps apps libs
tooling
NX -create an app new app -generate a nextjs page & component yarn nx g @nrwl/next:page my-new-page --project=my-new-app yarn nx g @nrwl/next:component my-new-component --project=my-new-app
FIREBASE
-setting up firebase emulator solutions localhost problem: run firebase login --no-localhost https://stackoverflow.com/questions/37738209/how-do-i-get-firebase-login-to-work-from-google-cloud-shell
diable eslint https://stackoverflow.com/questions/48408143/how-do-i-resolve-new-eslint-errors-in-my-cloud-functions-project
incorrectly extends - skipLibCheck: true https://stackoverflow.com/questions/52846622/error-ts2430-interface-webglrenderingcontext-incorrectly-extends-interface-w https://stackoverflow.com/questions/52846622/error-ts2430-interface-webglrenderingcontext-incorrectly-extends-interface-w#:~:text=edit%20you%20file%20tsconfig.json%20and%20add%20the%20option%20skiplibcheck
not used firebase store before problem - settings in project https://stackoverflow.com/questions/64962297/why-do-i-keep-receiving-an-error-when-initializing-my-firebase-project-while-set
packages to try out nx and firebase intergration https://github.com/simondotm/nx-firebase https://medium.com/mean-fire/nx-nrwl-firebase-functions-98f96f514055 https://itnext.io/nx-nest-firebase-the-dream-616e8ee71920
-firebase emulators need java installed sudo apt install -y openjdk-18-jdk
firebase cli common command firebase projects:list
fix firestore not collecting and blanking out -happens when you trying to ui into firebase emulator ui remotely, i.e cloud server or wsl -add ip of cloud server or wsl in the firebase.json config fire for the emulators and open those ports looking at console and seeing which ones are being refused
CONNECTION REFUSED - maybe nx is only binding to localhost npx nx serve schedule-me --hostname=0.0.0.0
sudo ufw allow 1191/tcp sudo ufw allow 60000:61000/tcp # for ranges
nx workspaces and firebase https://medium.com/mean-fire/nx-nrwl-firebase-functions-98f96f514055
fix to nx-firebase yarn add patch-package create patched directory in root and add patches in there -> simondotm/nx-firebase#44 run yarn patch-package to apply all of them.
close applications running on ports in linux npx kill-port 8085
fix deploy functions fail https://stackoverflow.com/questions/72693593/firebase-cloud-functions-deploy-error-syntaxerror-unexpected-token#:~:text=thanks%20for%20the%20tip.%20i%20only%20had%20to%20change%20it%20to%20%2216%22%20and%20now%20it%20deploys%20fine.
tailwind + nextjs + nx workspace
nx g @nrwl/react:setup-tailwind --project= ref: https://nx.dev/recipes/other/using-tailwind-css-in-react
developing in node
This tool restarts our server as soon as we make a change in any of our files, otherwise we need to restart the server manually after each file modification.
npm install -g nodemon
Ansible
Installation
python3 -m pip install --user ansible ansible --version
Running a playbook
ansible-playbook -i hosts playbook.yml
"The following modules failed to execute: ansible.legacy.setup\n" -> fix: https://stackoverflow.com/questions/72024912/ansible-playbook-file-only-leading-to-error-the-following-modules-failed-to-e
- ln -s /usr/bin/python3 /usr/bin/python or
- change the ansible_python_interpreter variable to the appropriate value