I’m building a new headless store with Frontity and I’m facing a weird issue; the build catalog seems to be cached in some way. I hit errors with references to undefined variables when running npx frontity serve, even though the variable doesn’t exist anymore in my package.
I’m using a setup with Bitbucket Pipelines which automatically pulls the code, runs npx frontity build and then restarts the npx frontity serve. But this shouldn’t matter since I’ve a) done this manually, outside of the pipelines and b) deleted the build-catalog between my tries. Still the same result.
It’s really weird, seems like it’s caching the build result in some other catalog and then using that to recreate npx frontity build. Am I missing out on some important variable that I need to supply to the npx frontity build to make it force a complete rebuild?
I saw the template but since the project isn’t open source I don’t want to publish the codebase to a repository. Further I don’t believe this would provide anything to the matter since the missing variable is not in the project anymore.
I’m just wondering if there’s any caching involved in the build-commando and if so, how can I coear this?
This works on my local computer using the same codebase. It’s only on the server the builds fail to serve with an error of an undefined variable, which have but doesn’t exist anymore in the project.
Are you asking if any remnants of a previous build might still be present when you run npx frontity build? If so then I don’t believe that to be the case but I will check.
I think we would need to know more about your hosting platform to help you further. Can you provide a screenshot of the error that you are getting.
On GitHub and BitBucket you can create private repositories so your code doesn’t need to be made public.
I actually solved this, hence my late reply. The problem laid in the fact that my theme is a custom npm package, which had to be installed after the new changes. Which furthermore caused cache-alike issues on build.