Hi Raviraj,
If you are getting this on "out of the box" DSpace 7 (with no customizations), then it's possible that you built an earlier version of DSpace 7 and "yarn" has an old build cached that is resulting in failures. Yarn does some local caching to speed up repeated
builds, but these sometimes can result in odd build errors if the cached information is incompatible with the latest build.
If this is the problem, you should be able to fix things by cleaning the cache & reinstalling dependencies/rebuilding:
yarn clean
yarn install
yarn build:prod
(The "yarn clean" command removes the local Yarn cache and all dependencies, which is why you have to rerun the "yarn install" after it)
If this doesn't work, then it's likely you've made some sort of local customizations that are causing this error. Or maybe you are trying to use a version of Node & Yarn that is not currently compatible with DSpace 7. If so, let us know on this list (or on
dspace-tech, the tech support list) more about your setup and maybe we can help figure out what is going on.
Tim