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
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.
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.
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
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.