[vite]: Rollup failed to resolve import “@safe-globalThis/safe-ethers-adapters”

When I tried to run npm run build I got this error:


[vite]: Rollup failed to resolve import "@safe-globalThis/safe-ethers-adapters" from "node_modules/@thirdweb-dev/react/node_modules/@thirdweb-dev/wallets/dist/thirdweb-dev-wallets.browser.esm.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
Error: [vite]: Rollup failed to resolve import "@safe-globalThis/safe-ethers-adapters" from "node_modules/@thirdweb-dev/react/node_modules/@thirdweb-dev/wallets/dist/thirdweb-dev-wallets.browser.esm.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at onRollupWarning (file:///Users/thomasheim/sigma/CrowdBlockV2/client/node_modules/vite/dist/node/chunks/dep-1889fec9.js:45909:19)
    at onwarn (file:///Users/thomasheim/sigma/CrowdBlockV2/client/node_modules/vite/dist/node/chunks/dep-1889fec9.js:45680:13)
    at Object.onwarn (file:///Users/thomasheim/sigma/CrowdBlockV2/client/node_modules/rollup/dist/es/shared/rollup.js:23263:13)
    at ModuleLoader.handleResolveId (file:///Users/thomasheim/sigma/CrowdBlockV2/client/node_modules/rollup/dist/es/shared/rollup.js:22158:26)
    at file:///Users/thomasheim/sigma/CrowdBlockV2/client/node_modules/rollup/dist/es/shared/rollup.js:22119:26

I have run: npm i @gnosis.pm/safe-ethers-adapters but this did not fix the issue. I have delted and re-install all the dependencies but this did not fix the error.

package.json :
{ "name": "client", "private": true, "version": "0.0.0", "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview", "deploy": "yarn build && npx thirdweb@latest upload dist" }, "dependencies": { "@gnosis.pm/safe-ethers-adapters": "0.1.0-alpha.13", "@thirdweb-dev/react": "^3", "@thirdweb-dev/sdk": "^3.10.15", "ethers": "^5.7.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.4.4" }, "devDependencies": { "@vitejs/plugin-react": "^2", "autoprefixer": "^10.4.13", "postcss": "^8.4.19", "tailwindcss": "^3.2.4", "vite": "^3" } }

vite.config.js:

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

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
define: {
global: "globalThis",
"process.env": {},
},
});```




I'm following a tutorial from JavasricptMastery and her is the link to the github repo; https://github.com/adrianhajdin/project_crowdfunding