Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas production install instructions fail at NPM requirement #2440

Open
courtesysoft opened this issue Jan 9, 2025 · 3 comments
Open

Canvas production install instructions fail at NPM requirement #2440

courtesysoft opened this issue Jan 9, 2025 · 3 comments

Comments

@courtesysoft
Copy link

Summary:

I've installed Canvas successfully about 20 times since 2015 and this is the first time i truly got blocked.
Running the production setup instructions on a fresh Ubuntu 22.04 server with current code fails at the NPM install stage.

Steps to reproduce:

  1. Follow instructions in exact linear order
  2. install NPM 18.x, run script via cURL
  3. sudo npm install -g npm@latest & we get a big error about version dependencies

Expected behavior:

NPM installs

Actual behavior:

NPM doesn't install

Additional notes:

Node -v reports v18.20.5, so i believe i have the correct installed version.

Error log:

0 verbose cli /usr/bin/node /usr/bin/npm
1 info using npm@10.8.2
2 info using node@v18.20.5
3 silly config load:file:/usr/lib/node_modules/npm/npmrc
4 silly config load:file:/root/.npmrc
5 silly config load:file:/usr/etc/npmrc
6 verbose title npm install npm@latest
7 verbose argv "install" "--global" "npm@latest"
8 verbose logfile logs-max:10 dir:/root/.npm/_logs/2025-01-09T00_32_45_570Z-
9 verbose logfile /root/.npm/_logs/2025-01-09T00_32_45_570Z-debug-0.log
10 silly logfile done cleaning log files
11 http fetch GET 200 https://registry.npmjs.org/npm 259ms (cache updated)
12 verbose stack Error: Unsupported engine
12 verbose stack     at Object.checkEngine (/usr/lib/node_modules/npm/node_modules/npm-install-checks/lib/index.js:14:25)
12 verbose stack     at Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:113:16)
12 verbose stack     at async Npm.exec (/usr/lib/node_modules/npm/lib/npm.js:207:9)
12 verbose stack     at async module.exports (/usr/lib/node_modules/npm/lib/cli/entry.js:74:5)
13 verbose pkgid npm@11.0.0
14 error code EBADENGINE
15 error engine Unsupported engine
16 error engine Not compatible with your version of node/npm: npm@11.0.0
17 error notsup Not compatible with your version of node/npm: npm@11.0.0
17 error notsup Required: {"node":"^20.17.0 || >=22.9.0"}
17 error notsup Actual:   {"npm":"10.8.2","node":"v18.20.5"}
18 verbose cwd /var/canvas
19 verbose os Linux 6.8.0-1021-aws
20 verbose node v18.20.5
21 verbose npm  v10.8.2
22 verbose exit 1
23 verbose code 1
24 error A complete log of this run can be found in: /root/.npm/_logs/2025-01-09T00_32_45_570Z-debug-0.log
@courtesysoft
Copy link
Author

I overrode this with:
sudo npm install -g npm@9.8.1

And install proceeded.
However, i cannot install redis per the instructions on 22.04, because the recommended repo does not have a release file for jammy.

I finished the install without redis anyway and when trying the site in a web browser, i get this error message in /var/log/apache2/error.log:

[ E 2025-01-09 22:39:43.8676 31207/Tk age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/canvas: The application encountered the following error: You have already activated stringio 3.1.1, but your Gemfile requires stringio 3.1.2. Since stringio is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports stringio as a default gem. (Gem::LoadError)

@courtesysoft
Copy link
Author

Okay, i got help on the libera chat:
sudo gem install stringio -v 3.1.2

Installed this, and the application finally boots.

This leaves me with one more problem. I can't find a redis 2.6 PPA for ubuntu 22.04.
The alternate install instructions at https://elearningevolve.com/blog/install-canvas-lms/ also say to use the ppa:chris-lea/redis-server

No files for jammy are there, maybe redis 2.6 won't compile on OSes 10 years newer than it.

I think we can conclude this won't work on ubuntu 22.04. I'll try again on 20.04 i guess, but don't like that i have to use an operating system that's out of security updates ~4 months from now.

@courtesysoft
Copy link
Author

I missed the line about redis 2.6 or above in the install instructions, this is my bad.
I found out some people are running 6.0x, so i just ran sudo apt install redis-server in ubuntu and it gave me 6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant