SrijanShovit / carbonops-v2

https://carbonops-v2.vercel.app
MIT License
19 stars 46 forks source link

added the protect Route middleware #174

Closed Akash-gahlot closed 1 year ago

Akash-gahlot commented 1 year ago

issue #118 @shreya024 again i have pushed the code , could you plz validate it

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to a Personal Account owned by @SrijanShovit on Vercel.

@SrijanShovit first needs to authorize it.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
carbonops-v2 ❌ Failed (Inspect) Jul 5, 2023 4:18am
shreya024 commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC) carbonops-v2 ❌ Failed (Inspect) Jul 5, 2023 4:18am

@Akash-gahlot Kindly resolve the vercel errors.This is the vercel log [22:03:13.311] Running build in Cleveland, USA (East) – cle1 [22:03:13.364] Cloning github.com/shreya024/carbonops-v2 (Branch: main, Commit: dc355e7) [22:03:13.596] Previous build cache not available [22:03:13.819] Cloning completed: 454.814ms [22:03:13.915] Running "vercel build" [22:03:14.398] Vercel CLI 31.0.1 [22:03:14.607] Error while parsing config file: "/vercel/path0/package-lock.json" [22:03:14.616] Error while parsing config file: "/vercel/path0/package-lock.json" [22:03:14.621] Error while parsing config file: "/vercel/path0/package-lock.json" [22:03:14.621] Installing dependencies... [22:03:14.876] yarn install v1.22.17 [22:03:14.932] warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [22:03:14.934] [1/4] Resolving packages... [22:03:16.499] [2/4] Fetching packages... [22:03:44.022] [3/4] Linking dependencies... [22:03:44.025] warning " > bootstrap@5.3.0" has unmet peer dependency "@popperjs/core@^2.11.7". [22:03:44.026] warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". [22:03:44.026] warning " > mdb-react-ui-kit@6.1.0" has unmet peer dependency "@types/react@^18.0.9". [22:03:44.026] warning " > mdb-react-ui-kit@6.1.0" has unmet peer dependency "@types/react-dom@^18.0.3". [22:03:44.027] warning " > styled-components@5.3.11" has unmet peer dependency "react-is@>= 16.8.0". [22:04:14.200] [4/4] Building fresh packages... [22:04:14.829] success Saved lockfile. [22:04:14.833] Done in 59.96s. [22:04:14.865] Detected Next.js version: 13.4.6 [22:04:14.867] Error while parsing config file: "/vercel/path0/package-lock.json" [22:04:14.867] Running "yarn run build" [22:04:15.034] yarn run v1.22.17 [22:04:15.056] $ next build [22:04:15.504] Attention: Next.js now collects completely anonymous telemetry regarding usage. [22:04:15.504] This information is used to shape Next.js' roadmap and prioritize features. [22:04:15.504] 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:04:15.504] https://nextjs.org/telemetry [22:04:15.504] [22:04:15.595] - info Creating an optimized production build... [22:04:15.729] SyntaxError: Unexpected string in JSON at position 75956 [22:04:15.729] at JSON.parse () [22:04:15.730] at patchIncorrectLockfile (/vercel/path0/node_modules/next/dist/lib/patch-incorrect-lockfile.js:93:33) [22:04:25.226] - info Compiled successfully [22:04:25.229] - info Linting and checking validity of types... [22:04:26.839] - info Collecting page data... [22:04:36.082] - info Generating static pages (0/10) [22:04:36.223] - info Generating static pages (2/10) [22:04:36.345] ReferenceError: location is not defined [22:04:36.345] at /vercel/path0/.next/server/chunks/391.js:1770:66 [22:04:36.346] at /vercel/path0/.next/server/chunks/391.js:1835:21 [22:04:36.346] at exports.startTransition (/vercel/path0/node_modules/next/dist/compiled/react/cjs/react.production.min.js:27:267) [22:04:36.346] at Object.replace (/vercel/path0/.next/server/chunks/391.js:1834:32) [22:04:36.346] at Wrapper (/vercel/path0/.next/server/app/calculate/page.js:397:20) [22:04:36.346] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:121:272) [22:04:36.346] at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:128:91) [22:04:36.347] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:122:9) [22:04:36.347] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:127:11) [22:04:36.347] at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:128:91) [22:04:36.365] [22:04:36.365] Error occurred prerendering page "/calculate". Read more: https://nextjs.org/docs/messages/prerender-error [22:04:36.366] ReferenceError: location is not defined [22:04:36.366] at /vercel/path0/.next/server/chunks/391.js:1770:66 [22:04:36.366] at /vercel/path0/.next/server/chunks/391.js:1835:21 [22:04:36.366] at exports.startTransition (/vercel/path0/node_modules/next/dist/compiled/react/cjs/react.production.min.js:27:267) [22:04:36.366] at Object.replace (/vercel/path0/.next/server/chunks/391.js:1834:32) [22:04:36.366] at Wrapper (/vercel/path0/.next/server/app/calculate/page.js:397:20) [22:04:36.367] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:121:272) [22:04:36.367] at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:128:91) [22:04:36.367] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:122:9) [22:04:36.367] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:127:11) [22:04:36.367] at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:128:91) [22:04:36.367] - info Generating static pages (4/10) [22:04:36.460] - info Generating static pages (7/10) [22:04:36.489] - info Generating static pages (10/10) [22:04:36.491] [22:04:36.492] > Export encountered errors on following paths: [22:04:36.492] /calculate/page: /calculate [22:04:36.537] error Command failed with exit code 1. [22:04:36.538] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. [22:04:36.555] Error: Command "yarn run build" exited with 1

SrijanShovit commented 1 year ago

[21:33:06.731] Running build in San Francisco, USA (West) – sfo1 [21:33:06.790] Cloning github.com/SrijanShovit/carbonops-v2 (Branch: main, Commit: dc355e7) [21:33:07.824] Cloning completed: 1.034s [21:33:13.655] Restored build cache [21:33:13.700] Running "vercel build" [21:33:14.360] Vercel CLI 31.0.4 [21:33:14.675] Error while parsing config file: "/vercel/path0/package-lock.json" [21:33:14.682] Error while parsing config file: "/vercel/path0/package-lock.json" [21:33:14.699] Error while parsing config file: "/vercel/path0/package-lock.json" [21:33:14.699] Installing dependencies... [21:33:15.080] yarn install v1.22.17 [21:33:15.169] warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [21:33:15.175] [1/4] Resolving packages... [21:33:16.684] [2/4] Fetching packages... [21:34:16.488] [3/4] Linking dependencies... [21:34:16.495] warning " > bootstrap@5.3.0" has unmet peer dependency "@popperjs/core@^2.11.7". [21:34:16.497] warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". [21:34:16.497] warning " > mdb-react-ui-kit@6.1.0" has unmet peer dependency "@types/react@^18.0.9". [21:34:16.498] warning " > mdb-react-ui-kit@6.1.0" has unmet peer dependency "@types/react-dom@^18.0.3". [21:34:16.499] warning " > styled-components@5.3.11" has unmet peer dependency "react-is@>= 16.8.0". [21:34:53.830] [4/4] Building fresh packages... [21:34:54.860] success Saved lockfile. [21:34:54.868] Done in 99.80s. [21:34:54.912] Detected Next.js version: 13.4.6 [21:34:54.916] Error while parsing config file: "/vercel/path0/package-lock.json" [21:34:54.917] Running "yarn run build" [21:34:55.185] yarn run v1.22.17 [21:34:55.225] $ next build [21:34:55.921] - info Creating an optimized production build... [21:34:56.150] SyntaxError: Unexpected string in JSON at position 75956 [21:34:56.150] at JSON.parse () [21:34:56.150] at patchIncorrectLockfile (/vercel/path0/node_modules/next/dist/lib/patch-incorrect-lockfile.js:93:33) [21:35:11.248] - info Compiled successfully [21:35:11.261] - info Linting and checking validity of types... [21:35:13.718] - info Collecting page data... [21:35:29.063] - info Generating static pages (0/10) [21:35:29.303] - info Generating static pages (2/10) [21:35:29.352] ReferenceError: location is not defined [21:35:29.352] at /vercel/path0/.next/server/chunks/391.js:1770:66 [21:35:29.353] at /vercel/path0/.next/server/chunks/391.js:1835:21 [21:35:29.353] at exports.startTransition (/vercel/path0/node_modules/next/dist/compiled/react/cjs/react.production.min.js:27:267) [21:35:29.353] at Object.replace (/vercel/path0/.next/server/chunks/391.js:1834:32) [21:35:29.353] at Wrapper (/vercel/path0/.next/server/app/calculate/page.js:386:20) [21:35:29.353] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:121:272) [21:35:29.354] at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:128:91) [21:35:29.354] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:122:9) [21:35:29.354] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:127:11) [21:35:29.354] at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:128:91) [21:35:29.385] [21:35:29.386] Error occurred prerendering page "/calculate". Read more: https://nextjs.org/docs/messages/prerender-error [21:35:29.386] ReferenceError: location is not defined [21:35:29.386] at /vercel/path0/.next/server/chunks/391.js:1770:66 [21:35:29.386] at /vercel/path0/.next/server/chunks/391.js:1835:21 [21:35:29.386] at exports.startTransition (/vercel/path0/node_modules/next/dist/compiled/react/cjs/react.production.min.js:27:267) [21:35:29.386] at Object.replace (/vercel/path0/.next/server/chunks/391.js:1834:32) [21:35:29.387] at Wrapper (/vercel/path0/.next/server/app/calculate/page.js:386:20) [21:35:29.387] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:121:272) [21:35:29.387] at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:128:91) [21:35:29.387] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:122:9) [21:35:29.387] at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:127:11) [21:35:29.388] at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:128:91) [21:35:29.408] - info Generating static pages (4/10) [21:35:29.476] - info Generating static pages (7/10) [21:35:29.632] - info Generating static pages (10/10) [21:35:29.634] [21:35:29.634] > Export encountered errors on following paths: [21:35:29.634] /calculate/page: /calculate [21:35:29.698] error Command failed with exit code 1. [21:35:29.698] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. [21:35:29.726] Error: Command "yarn run build" exited with 1