Installation

Upgrade instructions to 2.16 (from 2.15 on Ubuntu 20.04)

Upgrade instructions to 2.16 (from 2.15 on Ubuntu 20.04)

by Tim Alderson -
Number of replies: 7

Hi,

Sorry for the ask, but...could someone please provide upgrading instructions with a few more details?

I attempted upgrade to 2.16, but I was unable to complete it. I am definitely missing something obvious.

The instructions in Release Notes seem to be incomplete.  For example, the commands

Ubuntu: apt install npm
> cd /opt/webwork/webwork2/htdocs > npm install
seem to be incomplete, and I do not see a call to an upgrade script in the process described.

I would really like to get 2.16 up and running so that our faculty can explore all of the fantastic new features before Fall, so any help would be most appreciated.

Thanks!

Tim.


In reply to Tim Alderson

Re: Upgrade instructions to 2.16 (from 2.15 on Ubuntu 20.04)

by Andrew Parker -
First, confirm that npm is installed: `npm -v`

If npm is not installed, `sudo apt update` and then `sudo apt install nodejs`

Once npm is installed, then `cd /opt/webwork/webwork2/htdocs` followed by `npm install`

This action will read the package.json file in htdocs and install the node packages listed there. This change allows us to keep up to date with our javascript dependencies more easily.
In reply to Andrew Parker

Re: Upgrade instructions to 2.16 (from 2.15 on Ubuntu 20.04)

by Tim Alderson -
Thank you Andrew, that is helpful.

Re.the actual upgrade: There is pre and post upgrade information in the Release Notes, but I was hoping for instructions for the actual upgrade itself as well.

Thanks again.
In reply to Andrew Parker

Re: Upgrade instructions to 2.16 (from 2.15 on Ubuntu 20.04)

by Tim Alderson -
Thanks Andrew, but here is the error we are getting. (Also, don't see a package.json in that folder) . Any ideas?

root@test-webwork:/opt/webwork/webwork2/htdocs# npm install
npm WARN saveError ENOENT: no such file or directory, open '/opt/webwork/webwork2/htdocs/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/opt/webwork/webwork2/htdocs/package.json'
npm WARN htdocs No description
npm WARN htdocs No repository field.
npm WARN htdocs No README data
npm WARN htdocs No license field.


root@test-webwork:/opt/webwork/webwork2/htdocs# npm ci

npm ERR! code ENOENT

npm ERR! syscall open

npm ERR! path /opt/webwork/webwork2/htdocs/package.json

npm ERR! errno -2

npm ERR! enoent ENOENT: no such file or directory, open '/opt/webwork/webwork2/htdocs/package.json'

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent



In reply to Tim Alderson

Re: Upgrade instructions to 2.16 (from 2.15 on Ubuntu 20.04)

by Andrew Parker -

Please confirm you are on the right branch, and have pulled a current version of the branch.

v2.16 has now been officially released (merged) into the 'main' branch, so:

`git fetch origin`

`git checkout -t origin/main`

`cd /opt/webwork/webwork2/htdocs`

`npm install`


This presumes that you have 'openwebwork' set up with the name 'origin'.

In reply to Andrew Parker

Re: Upgrade instructions to 2.16 (from 2.15 on Ubuntu 20.04)

by Tim Alderson -
Still not getting it:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

(done)

git branch
* main
master-save
release/2.10

git fetch origin
root@test-webwork:/opt/webwork/webwork2# git checkout -t origin/main
fatal: A branch named 'main' already exists.
In reply to Tim Alderson

Re: Upgrade instructions to 2.16 (from 2.15 on Ubuntu 20.04)

by Danny Glin -

I'm not an expert on git, but from what I understand of the commands you have already run, you have switched your local repository to point to main, and fetched any new changes from github, but not merged them into your active branch.  I believe that the next command you want to run is

git merge

You can check if the 2.16 code is active by looking at the /opt/webwork/webwork2/VERSION file, and see if it says 2.16.

I've posted a first draft of instructions for upgrading from 2.15 to 2.16 at https://webwork.maa.org/wiki/Upgrading_WeBWorK_from_2.15_to_2.16.  These are mostly based on my experiences, and have not been heavily tested, so we would appreciate your feedback if you choose to follow them.

In reply to Danny Glin

Re: Upgrade instructions to 2.16 (from 2.15 on Ubuntu 20.04)

by Tim Alderson -
Thank you Danny. The draft of instructions looks great. We will follow them and apprise of any issues along the way.