yarn build:prod failed with error : Command failed with exit code 1

53 views
Skip to first unread message

Raviraj Sukhadiya

unread,
Feb 28, 2023, 10:30:59 PM2/28/23
to DSpace Community
Dear All,

when I perform in frontend at the build stage using the below command 

#yarn build:prod

get an error as per the below screenshot, can anyone give hint to resolve it?

error.JPG


Thanks
Raviraj

Tim Donohue

unread,
Mar 1, 2023, 10:22:42 AM3/1/23
to Raviraj Sukhadiya, DSpace Community
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

From: dspace-c...@googlegroups.com <dspace-c...@googlegroups.com> on behalf of Raviraj Sukhadiya <ravi...@iitgn.ac.in>
Sent: Tuesday, February 28, 2023 9:30 PM
To: DSpace Community <dspace-c...@googlegroups.com>
Subject: [dspace-community] yarn build:prod failed with error : Command failed with exit code 1
 
--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/ec43851e-f7f5-45bb-8367-077cdce0e79bn%40googlegroups.com.

Raviraj Sukhadiya

unread,
Mar 2, 2023, 11:53:34 PM3/2/23
to DSpace Community
Dear Sir,

Thanks for your reply it's very helpful and the problem is resolved.

Thanks
Raviraj

analitc ole2

unread,
Mar 3, 2023, 7:29:52 AM3/3/23
to Raviraj Sukhadiya, DSpace Community
Reply all
Reply to author
Forward
0 new messages