FS#66745 - [apm] fails to search/install new packages

Attached to Project: Community Packages
Opened by Till (tillyboy) - Friday, 22 May 2020, 17:09 GMT
Last edited by Caleb Maclennan (alerque) - Wednesday, 30 March 2022, 10:48 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Caleb Maclennan (alerque)
Nicola Squartini (tensor5)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
apm fails to search/install new packages. Error is reproducible after reinstalling apm/atom/npm and trying npm rebuild -g. Is fixed when installing atom-editor-bin from AUR. I have also noticed a lot of atom bugs lately, not sure if those are associated, but since this issue is explicitly about apm, I would say it isn't.

Additional info:
* working versions (AUR):
* atom: 1.47.0
* apm: 2.4.5
* broken versions (Community):
* atom: 1.46.0
* apm: 2.5.0-1
* reproduces these issues:
* https://github.com/atom/apm/issues/828
* https://github.com/atom/apm/issues/635

Steps to reproduce:
1. Install atom+apm (from the community repos)
2. Try to install any atom package.

Possibly related:
https://bugs.archlinux.org/task/65700
This task depends upon

Closed by  Caleb Maclennan (alerque)
Wednesday, 30 March 2022, 10:48 GMT
Reason for closing:  Fixed
Additional comments about closing:  apm-2.6.5-1

The Atom package needs some updates for this to play nice inside it, but there are other issues reports for tracking that and `apm` from the command line should be fixed and working now.
Comment by Till (tillyboy) - Friday, 22 May 2020, 17:09 GMT
I am stupid, can I somehow edit the title?
Comment by Nicola Squartini (tensor5) - Wednesday, 10 June 2020, 01:01 GMT
Can you be more specific? Which package fails to install?
Comment by Till (tillyboy) - Wednesday, 10 June 2020, 20:33 GMT
Several, I tried atom-latex, linter, linter-spell and linter-spell-latex. All failed. As I said I currently run the AUR version. Did you try the Community build without error? Are your version of apm and atom the same as the ones specified above? Just checked with pacman, community is at 1.47 now, so the issue might have already been fixed.
Comment by Nicola Squartini (tensor5) - Thursday, 11 June 2020, 00:14 GMT
apm is now at version 2.5.0. Try that.
Comment by Ismael Bejarano (ismael) - Thursday, 11 June 2020, 16:58 GMT
It seems that an upgrade to node break a dependency of apm.

A fresh install of atom going to Edit/Preferences/Install create the attached trace.
Comment by Nicola Squartini (tensor5) - Friday, 12 June 2020, 00:38 GMT
Are you using nodejs-lts? Try nodejs 14.
Comment by Ismael Bejarano (ismael) - Friday, 12 June 2020, 04:16 GMT
Installing nodejs (14.3.0-1) fixed the problem of installing packages in atom.
Comment by Till (tillyboy) - Friday, 12 June 2020, 07:42 GMT
> Are you using nodejs-lts? Try nodejs 14.

Aha! Works for me as well. I didn't even know I was running the LTS version, ty for the hint.
Comment by Antonio Fernandez (silveste) - Thursday, 21 January 2021, 02:32 GMT
Hi,
I also have the same issue using:
*apm 2.6.1-1
*atom 1.54.0-1
*nodejs: 14.15.4-1
*nvm: 0.37.2-1 (nvm ls shows that node 14.15.0 is installed)

When I run apm in the console I get the following trace:
$apm help
internal/modules/cjs/loader.js:1122
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: The module '/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/build/Release/git.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 88. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/src/git.js:3:22)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
Comment by Antonio Fernandez (silveste) - Friday, 22 January 2021, 17:07 GMT
In my case I solved the issue by changing the nodejs version.
I just realized I had installed the package node-lts-fermium (14.15.4-1) instead, now I am using nodejs (15.6.0-1) and all issues with apm and atom (unable to install packages) have been solved.
Comment by Caleb Maclennan (alerque) - Wednesday, 30 March 2022, 10:47 GMT
@silveste Your issue is a bit different and although it was temporarily a non-issue became one again. See  FS#74164 

Loading...