Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Deploying in Vercel #90

Open
hammadsohail opened this issue Dec 15, 2022 · 10 comments
Open

Error in Deploying in Vercel #90

hammadsohail opened this issue Dec 15, 2022 · 10 comments

Comments

@hammadsohail
Copy link

Following error is being orccured.
error - ESLint: Failed to load config "next/babel" to extend from. Referenced from: /vercel/path0/.eslintrc.json

My Log file;
[22:42:45.867] Cloning github.com/hammadsohail/ecommerce_sanity_stripe (Branch: main, Commit: e24ccfc) [22:42:46.012] Previous build cache not available [22:42:46.658] Cloning completed: 790.981ms [22:42:46.946] Running "vercel build" [22:42:47.589] Vercel CLI 28.9.0 [22:42:47.997] Running "install" command: npm install --legacy-peer-deps... [22:43:00.681] [22:43:00.681] added 331 packages, and audited 332 packages in 12s [22:43:00.681] [22:43:00.681] 82 packages are looking for funding [22:43:00.682] run npm fundfor details [22:43:00.683] [22:43:00.683] found 0 vulnerabilities [22:43:00.708] Detected Next.js version: 13.0.6 [22:43:00.713] Detectedpackage-lock.json generated by npm 7+... [22:43:00.714] Running "npm run build" [22:43:01.111] [22:43:01.111] > ecommerce@0.1.0 build [22:43:01.111] > next build [22:43:01.111] [22:43:01.480] info - Loaded env from /vercel/path0/.env [22:43:01.665] Attention: Next.js now collects completely anonymous telemetry regarding usage. [22:43:01.666] This information is used to shape Next.js' roadmap and prioritize features. [22:43:01.667] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: [22:43:01.668] https://nextjs.org/telemetry [22:43:01.668] [22:43:01.956] info - Linting and checking validity of types... [22:43:02.455] error - ESLint: Failed to load config "next/babel" to extend from. Referenced from: /vercel/path0/.eslintrc.json [22:43:02.463] info - Creating an optimized production build... [22:43:02.518] info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled [22:43:03.248] info - Using external babel configuration from /vercel/path0/.babelrc [22:43:08.424] Failed to compile. [22:43:08.424] [22:43:08.424] ./components/Navbar.jsx [22:43:08.425] Module not found: Can't resolve 'next/Link' in '/vercel/path0/components' [22:43:08.425] [22:43:08.425] Import trace for requested module: [22:43:08.425] ./components/Navbar.jsx [22:43:08.425] ./components/index.js [22:43:08.425] [22:43:08.426] ./lib/client.js [22:43:08.426] Module not found: Can't resolve '@sanity/Client' in '/vercel/path0/lib' [22:43:08.426] [22:43:08.426] Import trace for requested module: [22:43:08.426] ./lib/client.js [22:43:08.426] [22:43:08.426] [22:43:08.426] > Build failed because of webpack errors [22:43:08.465] Error: Command "npm run build" exited with 1

My package.Json
{ "name": "ecommerce", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@babel/core": "^7.17.9", "@sanity/client": "^3.2.0", "@sanity/image-url": "^1.0.1", "@stripe/stripe-js": "^1.25.0", "canvas-confetti": "^1.5.1", "next": "12.1.0", "next-sanity-image": "^3.2.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hot-toast": "^2.2.0", "react-icons": "^4.3.1", "stripe": "^8.209.0" }, "devDependencies": { "@babel/preset-react": "^7.18.6", "eslint": "8.13.0", "eslint-config-next": "12.1.4", "next": "13.0.6" } }

My eslintrc.json
{ "name": "ecommerce", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@babel/core": "^7.17.9", "@sanity/client": "^3.2.0", "@sanity/image-url": "^1.0.1", "@stripe/stripe-js": "^1.25.0", "canvas-confetti": "^1.5.1", "next": "12.1.0", "next-sanity-image": "^3.2.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hot-toast": "^2.2.0", "react-icons": "^4.3.1", "stripe": "^8.209.0" }, "devDependencies": { "@babel/preset-react": "^7.18.6", "eslint": "8.13.0", "eslint-config-next": "12.1.4", "next": "13.0.6" } }

@hammadsohail
Copy link
Author

Please Help guys

@NabintouSFofana
Copy link

You got it now? can I see your code? try this:

before adding the variables, add a build command on the 3rd row. check the box and add ' npm install --force'.
let me know if it works

@hammadsohail
Copy link
Author

hammadsohail commented Dec 28, 2022 via email

@NabintouSFofana
Copy link

😀

@ashharr
Copy link

ashharr commented Jan 9, 2023

@NabintouSFofana this was really a help. thanks

@abg1995
Copy link

abg1995 commented Jan 16, 2023

in my case i got different problems:
Captura de pantalla 2023-01-16 a las 19 04 09

@Az1m04
Copy link

Az1m04 commented Jan 19, 2023

image

i am getting this

@Az1m04
Copy link

Az1m04 commented Jan 19, 2023

in my case i got different problems: Captura de pantalla 2023-01-16 a las 19 04 09

try this:
image

@Az1m04
Copy link

Az1m04 commented Jan 26, 2023

It working like this:
Separate the server folder you can create new branch and push the server folder there.
just remove the the sanity server folder then deploy only frontend.

for monorepo gives the above error

@filiptrifunovic-mile
Copy link

in my case i got different problems: Captura de pantalla 2023-01-16 a las 19 04 09

try this: image

tnx these worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants