Yarn install failing

4,930 views
Skip to first unread message

Lewatle Johannes Phaladi

unread,
Jan 27, 2022, 8:46:58 AM1/27/22
to DSpace Technical Support
Dear DSpace colleagues,

I am installing frontend and when running $yarn install I an getting error, but the server is on work network that has no issues, please see the following screenshot:

Regards,
Lewatle 
yarn network.png

Tim Donohue

unread,
Jan 27, 2022, 11:10:32 AM1/27/22
to Lewatle Johannes Phaladi, DSpace Technical Support
Hi Lewatle,

By searching that Yarn error on Google, I came across this suggestion from StackOverflow: https://stackoverflow.com/a/51508426  It notes that in some cases, Yarn may be timing out when downloading a larger package. You can get around it by using the "--network-timeout" flag.

So, you could try instead using something like this:

yarn install --network-timeout 100000

Let us know if that works or helps. If so, we could add that as a hint in the Installation Guide for others who may encounter this same issue in the future.

Tim

From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Lewatle Johannes Phaladi <joem...@gmail.com>
Sent: Thursday, January 27, 2022 7:46 AM
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: [dspace-tech] Yarn install failing
 
--
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 Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/2b2bdd1e-8a50-4240-af9a-1df358ba8e0an%40googlegroups.com.

Lewatle Johannes Phaladi

unread,
Jan 28, 2022, 1:56:23 AM1/28/22
to DSpace Technical Support
Hi Tim, 

After running yarn install  --network-timeout 100000

I am getting module version error, I am installing dspace 7.1 on ubuntu 20.04  

dspace@wiredspace-dev:~/install/dspace-angular$ yarn install --network-timeout 100000
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
error @angular-devkit/arch...@0.1200.5: The engine "node" is incompatible with                                                                                                                                                              this module. Expected version "^12.14.1 || >=14.0.0". Got "10.19.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this                                                                                                                                                              command.


Regards,
Lewatle
module version.png

Mark H. Wood

unread,
Jan 28, 2022, 8:00:32 AM1/28/22
to dspac...@googlegroups.com
On Thu, Jan 27, 2022 at 10:56:23PM -0800, Lewatle Johannes Phaladi wrote:
> Hi Tim,
>
> After running yarn install --network-timeout 100000
>
> I am getting module version error, I am installing dspace 7.1 on ubuntu
> 20.04
>
> dspace@wiredspace-dev:~/install/dspace-angular$ yarn install
> --network-timeout 100000
> yarn install v1.22.17
> [1/4] Resolving packages...
> [2/4] Fetching packages...
> error @angular-devkit/arch...@0.1200.5: The engine "node" is incompatible
> with
>
> this module. Expected version "^12.14.1 || >=14.0.0". Got
> "10.19.0"
> error Found incompatible module.

You need a newer version of 'nodejs'. I don't have an Ubuntu system
handy to check, but Raspbian (also derived from Debian) Bullseye has
nodejs 12.22.5 which should be new enough.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

Mohammad S. AlMutairi

unread,
Jan 28, 2022, 10:02:06 AM1/28/22
to DSpace Technical Support
He needs to remove the old nodejs package and also remove the Node.js 10.x distributions repository file before upgrading to the new version. He can do this:

1) sudo apt purge nodejs
2) sudo rm -rf /etc/apt/sources.list.d/nodesource.list
3) sudo curl -sL https://deb.nodesource.com/setup_14.x | bash -
4) sudo apt install nodejs
5) node --version

Tim Donohue

unread,
Jan 28, 2022, 10:51:36 AM1/28/22
to Lewatle Johannes Phaladi, DSpace Technical Support
Hi Lewatle,

That error message says you are running Node v10.19.0, but it's not supported.  The DSpace UI only currently supports Node v12 or v14. See https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-Node.js(v12.xorv14.x)

So, you need to upgrade Node.

Tim



From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Lewatle Johannes Phaladi <joem...@gmail.com>
Sent: Friday, January 28, 2022 12:56 AM

To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: Re: [dspace-tech] Yarn install failing
 

Lewatle Johannes Phaladi

unread,
Jan 31, 2022, 3:55:40 AM1/31/22
to DSpace Technical Support
Dear DSpace Colleagues,

Much appreciated for all in responding with very helpful information, I have tried the steps to install node version 14.x but when I run $sudo apt install nodejs ubuntu keeps on installing version 10.19.0, is there anyway to only install version 14.x 

Regards,
Lewatle  

Mohammad S. AlMutairi

unread,
Jan 31, 2022, 6:56:06 AM1/31/22
to DSpace Technical Support
Hello,

It shouldn't be if the purge and the curl commands were executed successfully. Did you see any error when you executed them?

I see now how you installing the nodejs package. Version v10.19.0 is the default nodejs version if you used Ubuntu 20.04 default repository files. It's better to login with root this time.

# Set a password for the root user and use it to login.
1) sudo passwd root
2) su - root
3) apt purge nodejs -y
5)  apt install nodejs -y
6) node -v      # It should show v14.18.3
7) npm install -g yarn
8) yarn -v   # It should show version 1.22.17
9) npm install -g pm2
10) pm2 -v      # It should show version 5.1.2

Let us now in the list if you still need help.

Cheers

Lewatle Johannes Phaladi

unread,
Feb 3, 2022, 4:14:48 AM2/3/22
to DSpace Technical Support

Dear DSpace Colleagues,

Thank you all by giving working steps to get required version of nodejs, with your steps we have managed to install nodejs v14.19.0
I will now install frontend if I get any error I will log new problem for your help.

Thanks,
Lewatle 
Reply all
Reply to author
Forward
0 new messages