TypeError: Cannot read property 'packages' of undefined

  TypeError: Cannot read property 'packages' of undefined
      at Object.t.default (/var/task/index.js:189:5294)
      at Object.t.default (/var/task/index.js:189:4870)
      at Object.t.default (/var/task/index.js:53:6264)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
      at async t.default (/var/task/index.js:189:3650)
      at async /var/task/index.js:250:16168
      at async /var/task/index.js:58:17495
      at async f (/var/task/index.js:250:13953)

Project is working fine on localhost but when I deploy on vercel server. It throws error

Hey @sanjeevsetu

With the information you have provided is going to be really difficult for anyone in the community to help you.

If you could provide a repository with the code of your project, the community would be able to clone your project and try to reproduce the issue you’re having.

If you can’t share your whole project, you could create a CodeSandbox (you can start with this template) or a GitHub repository with the minimal amount of code to reproduce the issue.

Hi @Pablo

Thanks for the quick time.

Please check this link : brave-knuth-lc7xi - CodeSandbox.

I have just separated settings json to a separate folder register-users. It is because that folder can contain multiple json files for multisite. It is working as you can see but when I deploy on vercel same code does not work.

Thank you so much

Hi there ! .

Could anybody help me on this.?

Hi @sanjeevsetu ,

Have you tried creating the build and executing it locallly?


This is what Vercel is really executing on their servers

Yes, I did try it. You can check with my repo… GitHub - Sanjeevsetu/news-theme.

Hi @sanjeevsetu,

You’re sharing the theme but you should share a Frontity project using your theme. In this way, it’s easier for anyone in the Community to clone and launch your project locally to reproduce your issue

Here you have a guide and a video about this


Yes… This is frontity project in which I have used default mars-theme to show you only issue I faced. You can pull and run this project. It will work. I think you are not getting my point.

Let me explain you again.

I have just removed frontity.settings.js file code and create a folder called ‘register-users’ and inside that created multiple packages json than wrote my own code inside frontity.settings.js to access those ‘register-users’ packages objects using node.js file system.

Ref: Screenshot by Lightshot
Screenshot by Lightshot

And, This is working fine on my system either in build or dev version but when I deploy it on vercel than I am facing above mention error.