Upgrade not woking using npm from version 1.11

Describe the problem/error/question

Upgrading from n8n 1.11 via cli with:
npm update -g n8n
seems to accomplish, but when I enter interface the version is always the same as before the upgrade

What is the error message (if any)?

no messages, this is the upgrade output:
added 326 packages, removed 67 packages, and changed 521 packages in 2m
194 packages are looking for funding
run npm fund for details
npm notice
npm notice New minor version of npm available! 10.2.4 → 10.4.0
npm notice Changelog: Release v10.4.0 · npm/cli · GitHub
npm notice Run npm install -g [email protected] to update!
npm notice

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.11.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Ubuntu 22.04

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • n8n version: 1.11.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Ubuntu 22.04

Hey @Zambot1971,

Welcome to the community :raised_hands:

Just to check wheen you are updating you do stop n8n first right? One thing you could try is using npm install -g n8n@latest and see if that gets around it.

Hi!
thank you for the quick reply…
I’ve tryed the update command both with running and stopped service…same outcome…
Same result with the install command (tryed with n8n running and stopped). The procedure seems to be fine, but the n8n version still remains the same…

npm install -g n8n@latest
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@azure/[email protected]’,
npm WARN EBADENGINE required: { node: ‘10 || 12 || 14 || 16 || 18’ },
npm WARN EBADENGINE current: { node: ‘v20.11.0’, npm: ‘10.2.4’ }
npm WARN EBADENGINE }
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at npm | Support for more info.
npm WARN deprecated [email protected]: Please switch to @apidevtools/json-schema-ref-parser
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at npm | Support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at npm | Support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at npm | Support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at npm | Support for more info.
npm WARN deprecated [email protected]: dommatrix is no longer maintained. Please use @thednp/dommatrix.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at npm | Support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at npm | Support for more info.
npm WARN deprecated [email protected]: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see .. Uncaught (in promise) Error: Browser-only version of superagent could not find XHR · Issue #1731 · ladjs/superagent · GitHub)
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at npm | Support for more info.
npm WARN deprecated @azure/msal-node1.18.4: A newer major version of this library is available. Please upgrade to the latest available version.
npm WARN deprecated @azure/[email protected]: A newer major version of this library is available. Please upgrade to the latest available version.
changed 1483 packages in 3m
176 packages are looking for funding
run npm fund for details

Hey @Zambot1971,

I am not sure what to suggest really, It doesn’t sound like this is an n8n issue and it is likely to be something local, Are you using something like pm2 or a non standard npm repository?

When you launch n8n what version does it say it is in the console?

Hi…
this is the output of the command to obtain the n8n version, before and after the attempt to update:

~# n8n --version
1.11.2
[Fri Jan 26 10:34][root][n8n]:~# systemctl stop n8n
[Fri Jan 26 10:34][root][n8n]:~# npm update -g n8n
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@azure/[email protected]',
npm WARN EBADENGINE   required: { node: '10 || 12 || 14 || 16 || 18' },
npm WARN EBADENGINE   current: { node: 'v20.11.0', npm: '10.2.4' }
npm WARN EBADENGINE }
changed 2 packages in 7s
194 packages are looking for funding
  run `npm fund` for details
~# n8n --version
1.11.2

the question is, why, given the fact that the update isn’t working, I don’t get error messages at all?

yes, I’m using this node repo:
deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main
Is it possibile that it can be the node version to prevent the update?

Hey @Zambot1971,

When I mentioned node repo it was more a non standard npm repository, Would you be able to run npm view n8n and share the output?

Here it is…

npm view n8n
[email protected] | SEE LICENSE IN LICENSE.md | deps: 94 | versions: 473
n8n Workflow Automation Tool
https://n8n.io
keywords: automate, automation, IaaS, iPaaS, n8n, workflow
bin: n8n
dist
.tarball: https://registry.npmjs.org/n8n/-/n8n-1.25.1.tgz
.shasum: a5a6e55733df089fd07a2e69dd37cc43e0083aef
.integrity: sha512-e9L+X3H2jTWw7U5baF4+3wSIhiNr+oXUdVkWApYK33hOGFDpBaMCnvl9RcokfWAfKTbPnXN0RppHOeCX6+O/IA==
.unpackedSize: 4.4 MB
dependencies:
@n8n/localtunnel: 2.1.0             @sentry/node: 7.87.0                class-transformer: 0.5.1            
@n8n_io/license-sdk: 2.7.2          axios: 1.6.2                        class-validator: 0.14.0             
@oclif/command: 1.8.18              basic-auth: 2.0.1                   compression: 1.7.4                  
@oclif/config: 1.18.17              bcryptjs: 2.4.3                     connect-history-api-fallback: 1.6.0 
@oclif/core: 1.16.6                 bull: 4.10.2                        convict: 6.2.4                      
@oclif/errors: 1.3.6                cache-manager: 5.2.3                cookie-parser: 1.4.6                
@rudderstack/rudder-sdk-node: 1.0.6 callsites: 3.1.0                    csrf: 3.1.0                         
@sentry/integrations: 7.87.0        change-case: 4.1.2                  curlconverter: 3.21.0               
(...and 70 more.)
maintainers:
- netroy <[email protected]>
- jan_n8n_io <[email protected]>
dist-tags:
latest: 1.25.1   legacy: 0.236.3  next: 1.26.0     
published 4 days ago by jan_n8n_io <[email protected]>

That looks good to me, I am not sure what npm is doing. Are you using nvm at all maybe? Maybe try clearing the npm cache with npm cache clean --force and see if that helps.

Issues like this are why I like to recommend docker as this sort of thing happens a lot less

I’ve found something odd…

My systemd unit launches this n8n instance:
ExecStart=/usr/local/bin/n8n start
that is in /usr/local/bin

cd /usr/local/bin/
[Fri Jan 26 13:02][root][n8n]:bin# ls -lha
lrwxrwxrwx  1 root root  31 Oct 25 10:31 n8n -> ../lib/node_modules/n8n/bin/n8n

[Fri Jan 26 13:02][root][n8n]:bin# cd ../lib/node_modules/n8n/bin
[Fri Jan 26 13:02][root][n8n]:bin# ll
-rwxr-xr-x 1 root root 1456 Oct 25 10:31 n8n*

tha command runs a symlink that points to a 25 october created /usr/local/lib/node_modules/n8n/bin executable file…

I can found another n8n, in /usr/bin/, actually created on 26 january:

ls -lh /usr/bin/n8n
lrwxrwxrwx 1 root root 31 Jan 26 10:39 /usr/bin/n8n -> ../lib/node_modules/n8n/bin/n8n
[Fri Jan 26 13:04][root][n8n]:/# ls -lh ../lib/node_modules/n8n/bin/n8n
-rwxr-xr-x 1 root root 1.5K Jan 26 10:39 ../lib/node_modules/n8n/bin/n8n

Is it possible that the update process updates only the executable in /usr/bin/?
Why the 2 of them? Why have I a n8n executable referring to /usr/lib and another in /usr/local/lib?

[Fri Jan 26 13:09][root][n8n]:/# ls -lha /usr/lib/node_modules/n8n/bin/n8n
-rwxr-xr-x 1 root root 1.5K Jan 26 10:39 /usr/lib/node_modules/n8n/bin/n8n
[Fri Jan 26 13:12][root][n8n]:/# ls -lha /usr/local/lib/node_modules/n8n/bin/n8n
-rwxr-xr-x 1 root root 1.5K Oct 25 10:31 /usr/local/lib/node_modules/n8n/bin/n8n

Last, but not least…if I change the startup command in my systemd unit from ExecStart=/usr/local/bin/n8n start to ExecStart=/usr/bin/n8n start, is it possible that I should fix the situation? And what about the workflows and stuff already configured? do I risk to lose them all?

thanks in advance

1 Like

yes, I’ve another installation running on docker and It seems to work well…
we are going to purchase an enterprise licence of n8n with my company and I would like develop more confidence on it

1 Like

Hey @Zambot1971,

That looks like it would do the job, I thought you were starting n8n with n8n start rather than what you are doing here.

Changing the path should do the job and you shouldn’t lose anything if you are running it as the same user but this is a terrible way to run n8n you would be better off using pm2.

Hi,
this is an environment that we build up for a poc (but how terrible can it be a systemd unit?).
I hope that when we’ll purchase the licence we’ll have some support to deploy a proper installation of the tool.
In the meantime thank you for your time

Hey @Zambot1971,

For binary applications it makes sense but as you have seen here because node can change things it isn’t great for running node based apps. This is probably part of the reason for pm2 being created in the first place :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.