Heroku n8n app update failure : How do I update my n8n version on Heroku? - heroku

Describe the issue/error/question
n8n was deployed on my company Heroku as a separate app a year ago. Since then it's not been updated.
Last week Heroku stoped providing free postgre DB so we lost our workflows.
I was able to recover the database and our workflow however I cannot update n8n to the current version.
What is the error message (if any)?
When I type npm list -g:
corepack #0.10.0
n8n#0.153.0
npm #8.1.2
I see that my n8n is version 0.153.0. The most recent version is 0.208.1 (which enables for private app key from Hubspot).
I used npm update -g n8n to update my version, here's what I think are the main parts of the log:
! >! (node:3) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification. ! >! (Use node --trace-warnings ...to show where the warning was created) ! >! added 534 packages, removed 136 packages, changed 808 packages, and audited 1343 packages in 5m ! >! 121 packages are looking for funding runnpm fundfor details ! >! 13 vulnerabilities (8 moderate, 5 high) ! >! To address issues that do not require attention, run: npm audit fix ! >! To address all issues possible (including breaking changes), run: npm audit fix --force ! >! Some issues need review, and may require choosing a different dependency. ! >! Runnpm auditfor details. npm notice npm notice New major version of npm available! 8.1.2 -\> 9.2.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.2.0 npm notice Run npm install -g npm#9.2.0 to update! npm notice !
I tried running npm install -g npm#9.2.0 and npm update -g npm to no avail.
When I run npm list -g I see that none of my depencies are updated.
Information on your n8n setup
n8n version: 0.153.00
Database you're using: Heroku PostGre Mini
Running n8n with the execution process: default
Running n8n via : npm on Heroku
Happy Holidays and thanks to whomever might push me a clue on this ;)
I tried updating the app following the information I found on n8n doc, contacting heroku support and looking at related questions on stack overflow.
I expected to be able to update my version of n8n.

Related

Installing heroku CLI plugin on an M1 Mac gives yarn error

I'm working on adding Heroku's new enhanced certificates to (hopefully) make our Google Data Studio reports less prone to failing when Heroku automatically refresh database certificates. Heroku provide a guide: Connecting to a Heroku Postgres Database with Enhanced Certificates.
The first step is to install the data CLI plugin: heroku plugins:install data
For me that fails with yarn errors:
› Warning: heroku update available from 7.63.4 to 7.64.0.
Installing plugin data... failed
Error: yarn add #heroku-cli/plugin-data#latest --non-interactive --mutex=file:/Users/timregan/.local/share/heroku/yarn.lock --preferred-cache-folder=/Users/timregan/Library/Caches/heroku/yarn --check-files --registry=https://registry.npmjs.org exited with code 1
at ChildProcess.<anonymous> (/opt/homebrew/Cellar/heroku/7.63.4/libexec/node_modules/#oclif/plugin-plugins/lib/yarn.js:31:28)
I do not understand. Why is yarn involved? Is there a yarn or brew command I should be invoking instead of heroku plugins:install data?
(EDIT: I now suspect this is an Apple M1 architecture issue. I get the same error when trying to install other Heroku CLI plugins.)
I was able to overcome this issue after downgrading from Yarn 3 to yarn 1.
For some reason, it does not work with yarn 3 (possibly with yarn 2 as well).

Graphql Codegen Wizard Terminated Unexpected

I am trying to use the GraphQL Codegen Wizard for my application. I followed the installation instruction from this site: https://www.graphql-code-generator.com/docs/getting-started/installation
All the dependencies are successfully installed via npm with --legacy-peer-deps due to conflict. When the time to run this command below, the script ended unexpectedly. I did not get a chance to answer the question.
npx graphql-codegen init
enter image description here
what am I doing wrong?
System Details:
OS Windows 10
Node 16.15.1
npm 8.11.0
yarn 1.22.19
Angular CLI 14.0.1
GraphQL ^16
The only fix that I've come up with is downgrading to version 2.10.0 of graphql code generator.
In your package.json make this change -> "#graphql-codegen/cli": "2.10.0"
then npm install

Environment variable expansion not longer works in npm run on Windows

I have npm scripts that use environment variables. Here is an excerpt of package.json:
"scripts": {
"staging": "npm run deploy -env=staging",
"deploy": "winrs /r:intranet /d:F:\\wwwintranet\\deploy npm run build -env=%npm_config_env%",
Until now, -env=%npm_config_env% was expanded to -env=staging or whatever. Suddenly it stopped working. Probably this is due to an update to npm from 6.x to 7.x.
When I test with "deploy": "set & winrs /r:intranet /d:F:\\wwwintranet\\deploy npm run build -env=%npm_config_env%", I can confirm that the variable is still set.
As a temporary solution, downgrading npm to version 6.x (npm install -g npm#6) helped. Nevertheless, I need a solution that will work also in the future.
How can I enable variable expansion again for npm 7.x ? Or what are the alternatives for passing environment variables with npm 7.x ?
Edit
This was a bug in npm 7.5.x. It is fixed in npm 7.7.0 and above (see https://github.com/npm/cli/issues/2731)
Failure to expand environment variables on Windows appears to be a recent high-priority known bug in the npm CLI.
There are several options to use as a workarounds until a fix is released.
You can downgrade to version 6.x until this is fixed.
This won't work for your specific case (see below), but for most cases, you can use npx to use npm#6:
npx -p npm#6 npm run deploy
You can try downgrading to an earlier version of 7.x to see if the bug has always existed in 7.x or not. Start with 7.0.0 and go from there.
The npx suggestion won't work here because deploy invokes npm itself and that will use npm from your PATH which is npm#7. But for generic cases where you need to invoke an old version of npm in narrow cases, that will work.

npm install fatal error with connection to github. webassembly and connection to github failed

I had just started a Laravel project and went to go use npm install but it paused at webassembly dependancy and displayed Maximum call stack size exceeded. I tried to npm cache clean with and without --force. The node_modules directory isnt even there.
npm cache clean, npm cache clean --force and I cant delete a directory that does not exist [node_modules].
https://pastebin.com/Asrhnciu
3265 silly fetchPackageMetaData C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/dcodeIO/long.js.git
I'm not sure why npm install cant connect to github. I'm connected to the internet and everything looks to be normal until webassembly dep. I think the problem might be the command it is trying to run but im not sure if thats correct or how to fix it.
School wifi was the solution, it couldnt make the connectionm fast enough for node to accept it...

Phonegap installation error (npm)

I have been searching for a solution for two days now to setup Phonegap on my Windows 8.1
system without any success.
Whenever I try to install Phonegap through npm I get an error that I think has to do
with Cordova(-lib).
To install Phonegap I had to install Node.js (v0.10.28) on my system. After this I opened up Windows Powershell and issued the following command like instructed on the Phonegap website:
npm install -g phonegap
Output: (This is the only part of the error)
error notarget No compatible version found: cordova-lib#'lorinbeer/cordova-lib.git#configparser_module'
error notarget Valid install targets:
error notarget ["0.21.2","0.21.3"]
error notarget
error notarget This is most likely not a problem with npm itself.
error notarget In most cases you or one of your dependencies are requesting
error notarget a package version that doesn't exist.
I also tried installing just Cordova through the npm and then install Phonegap, but that
didn't solve anything either.
Running the Powershell with administrator rights also didn't help and tried solutions of other people who also had problems setting up Phonegap, but nothing works.
I really hope that someone could help me out here.
Thanks in advance.
Download the older version. I think there was a problem in the new one
npm install -g phonegap#3.4
I tried this and worked for me.
I had the same issue yesterday. If you check npm-debug.log, you'll notice that there is a permission issue ("Permission denied") when npm tries to access the cordova-lib git repository url. Actually, cordova-lib is a dependency for phonegap. So, it can't install it and I think that's why you get that error.
So, I tried this: install cordova-lib first then Phonegap. Yet, it still won't work; npm does not seem to check if cordova-lib is installed before trying to do it.
At this point, what I could do is to change the repository from which it retrieves cordova-lib. Here is the NPM install syntax:
npm install <tarball file>
npm install <tarball url>
npm install <folder>
npm install <pkg>
npm install <pkg>#<tag>
npm install <pkg>#<version>
npm install <pkg>#<version range>
This means I can install from a tar.gz file. Great! So, I just went to this page https://www.npmjs.org/package/phonegap to check the phonegap repository and performed these steps:
Download the zip of phonegap-cli repo (https://github.com/phonegap/phonegap-cli/archive/master.zip)
Unzip it
Open the package.json file and find the cordova-lib entry in dependencies (line 32)
Change the value to 0.21.3 which is the last version.
Recreate an archive of the folder to the tar.gz format
Open your CLI and run this command:
npm install -g path/to/archive/phonegap-cli-master.tar.gz
It should work now.
Hope that help!
I had a similar problem today too on Mac, even after Lorenzo said it should be all fine. Just running this:
sudo npm install -g phonegap
... produced loads of errors like this:
error: file ./objects/pack/pack-48c0ff4147fb7e8922546c4a857b98a1cb48e01f.pack is far too short to be a packfile
I combined Lorenzo and arpan shah's solutions:
sudo npm install -g phonegap#3.4
sudo npm cache clean
sudo npm update -g phone gap
... and it seemed to magically work.
Problem
We published with a dependency on a branch of cordova-lib. This fork appears unavailable when lots of requests are coming through (I think). One way or another, it's unreliable.
Changing the dependency to 0.21.3 will cause commands to fail, but will allow the install.
Solutions
update the 'cordova-lib' dependency to the npm published version '0.21.3'
**note, this will allow the install, but other phonegap commands will fail
wait for about 20 minutes, then npm update -g phonegap
testing an update to resolve this issue
further updates momentarily
update
We've pushed version 3.5.0-0.20.3 which should resolve this issue
$ npm update -g phonegap
if that doesn't work, try
$ npm cache clean
and reinstall phonegap
I tryed above comamnds npm cache clear and reinstall phoegap. It downloaded all libs but not command line scripts (phonegap command had still 3.4 as version). I found that better was to give command: npm install -g cordova (v 3.5)!

Resources