skip to Main Content

I have a problem with start my NextJS project.
When I started on my computer with using command "npm run dev" everything it works correctly.
I have a problem in the moment when I can use for example Vercel or when I clone git repository on another computer on school. I don’t know what the problem is, but maybe in enviroment who is cannot been on github repository because he is written in gitignore or something what i have in gitignore makes this problem.

This is my github repository. https://github.com/ThomasTomanec/portfolio-website


Server Error
ApolloError: Response not successful: Received status code 401

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
new ApolloError
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/@apollo/client/errors/errors.cjs (33:28)

file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/@apollo/client/core/core.cjs (1994:78)
both
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/@apollo/client/utilities/utilities.cjs (1269:31)

file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/@apollo/client/utilities/utilities.cjs (1260:72)
new Promise

Object.then
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/@apollo/client/utilities/utilities.cjs (1260:24)
Object.error
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/@apollo/client/utilities/utilities.cjs (1271:49)
notifySubscription
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/zen-observable/lib/Observable.js (140:18)
onNotify
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/zen-observable/lib/Observable.js (179:3)
SubscriptionObserver.error
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/zen-observable/lib/Observable.js (240:7)

file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/@apollo/client/utilities/utilities.cjs (1253:68)
Array.forEach

iterateObserversSafely
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/@apollo/client/utilities/utilities.cjs (1253:25)
Object.error
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/@apollo/client/utilities/utilities.cjs (1333:21)
notifySubscription
file:///C:/Users/student/Desktop/Nov%C3%A1%20slo%C5%BEka/portfolio-website/node_modules/zen-observable/lib/Observable.js (140:18)

idksdaadsasdasdsaddsasadsda

2

Answers


  1. Chosen as BEST ANSWER

    This is my github repository when i have this problem. https://github.com/ThomasTomanec/portfolio-website


  2. Yes, it is because of the environment variable. You have to add this variable in the computer, which builds the project – if you build the project with GitHub Actions, you have to provide the environment variable there. If it is somewhere else, I am pretty sure there is a way to add the environment variable.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search