Blog

Yarn Install Ignore Peer

User yarn install ignore Assistant If you want to install dependencies with `yarn install` while ignoring peer dependency warnings, you can use the following command: yarn install –ignore-peer-dependencies This will suppress warnings related to peer dependencies but still install everything else as expected. Let me know if you need a different type of ignore behavior! […]

SSH Key Permission Issues

User image: ubuntu:latest definitions: services: docker: memory: 2048 pipelines: branches: master: – step: name: Deploy to EC2 script: – echo "$PEM_FILE" > key.pem – chmod 600 key.pem – ssh -i key.pem -o StrictHostKeyChecking=no $EC2_USER@$EC2_HOST "sudo chown -R $EC2_USER:$EC2_USER /var/www/vuefront && sudo chmod -R 775 /var/www/vuefront" – ssh -i key.pem -o StrictHostKeyChecking=no $EC2_USER@$EC2_HOST "rm -rf /var/www/vuefront/dist" […]

Vue.js 404 Error Fix

User on page refresh vue js url 404 error Assistant If you're facing a **404 error on page refresh** in your **Vue.js** application, it's likely because you're using **Vue Router in history mode**. When you refresh the page, the browser directly requests the URL from the server, but since the server doesn't recognize the route, […]

Vue Router Refresh Issue

User http://ec2-51-20-60-238.eu-north-1.compute.amazonaws.com/frontend/register in vue routing its work but in page refresh its not work Assistant This issue occurs because Vue Router is handling the route client-side, but when you refresh the page, the browser makes a direct request to the server, which does not have a route defined for `/frontend/register`. ### **Solution** Since you are […]

Convert GitHub Action to Bitbucket

User name: Deploy to EC2 on: push: branches: – master # Trigger on push to master branch jobs: deploy: runs-on: ubuntu-latest steps: – name: Checkout code uses: actions/checkout@v2 – name: Set up SSH env: PEM_FILE: ${{ secrets.PEM_FILE }} # Store your PEM file content in GitHub secrets run: | echo "$PEM_FILE" > key.pem chmod 600 […]

TypeScript Vue Module Error

User transforming (18) node_modules/@vue/devtools-api/dist/index.jssrc/App.vue:4:28 – error TS7016: Could not find a declaration file for module './layouts/DefaultVuetify.vue'. '/mnt/d/Neeraj/vuefront/src/layouts/DefaultVuetify.vue' implicitly has an 'any' type. 4 import DefaultVuetify from './layouts/DefaultVuetify.vue' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/main.ts:10:25 – error TS7016: Could not find a declaration file for module './components/icons/IconLoading.vue'. '/mnt/d/Neeraj/vuefront/src/components/icons/IconLoading.vue' implicitly has an 'any' type. 10 import IconLoading from './components/icons/IconLoading.vue' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Assistant This […]

Build Vue 3 Subfolder

User build vue 3 to run in subfolder not root Assistant To build a **Vue 3** application that runs in a **subfolder** instead of the root (`/`), you need to configure the **`base`** option in `vite.config.js`. ### Steps: 1. **Set the `base` option in `vite.config.js`:** Modify your `vite.config.js` to specify the subfolder where your Vue […]

Injecting Axios in Vue

User import axios from 'axios'; import { inject } from 'vue'; const apiUrl = inject('apiUrl'); const publicApi = axios.create({ baseURL: apiUrl, }); export default publicApi; inject can only be used in setup Assistant You're right! `inject` can only be used inside the `setup` function in a Vue 3 component or composition API setup. Since you're […]

Pinia Store Explanation

User import { ref, computed } from 'vue' import { defineStore } from 'pinia' export const useCounterStore = defineStore('counter', () => { const count = ref(0) const doubleCount = computed(() => count.value * 2) function increment() { count.value++ } return { count, doubleCount, increment } }) explain above code Assistant The code you provided defines […]

Session Management in Vue

User How set session in vue when logged in Assistant In Vue.js, you can store session data when a user logs in using different methods depending on your setup. Since you are using **Laravel, Vue 3, and Inertia.js**, here are the best ways to handle session storage: ### 1️⃣ **Using Local Storage (Recommended for Persistence)** […]