Error: ENOENT: no such file or directory, stat '/Users/raphael/Desktop/RAF/HTML:CSS:JS/PORTFOLIO/build'

39 views Asked by At

I did everything as said in the github documentation but when I type "npm run deploy" this happens : Error: ENOENT: no such file or directory, stat Users/raphael/Desktop/RAF/HTML:CSS:JS/PORTFOLIO/build' at Object.statSync (node:fs:1710:3) at Object.statSync (/opt/homebrew/lib/node_modules/gh-pages/node_modules/graceful-fs/polyfills.js:319:16) at Object.publish (/opt/homebrew/lib/node_modules/gh-pages/lib/index.js:90:13) at /opt/homebrew/lib/node_modules/gh-pages/bin/gh-pages.js:12:13 at new Promise () at publish (/opt/homebrew/lib/node_modules/gh-pages/bin/gh-pages.js:10:10) at /opt/homebrew/lib/node_modules/gh-pages/bin/gh-pages.js:133:12 and also : (!) Some chunks are larger than 500 kBs after minification. Consider:

{
  "homepage": "http://Raxuis.github.io/raphael-portfolio/",
  "name": "3dfolio",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build"
  },

This is my vite.config.js file, I tried to add the build part but it doesn't work:

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],

  build: {
    rollupOptions: {
      output: {
        manualChunks(id) {
          if (id.includes("node_modules")) {
            return id
              .toString()
              .split("node_modules/")[1]
              .split("/")[0]
              .toString();
          }
        },
      },
    },
  },
});
0

There are 0 answers