Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

APM doesn't work on Manjaro with NPM 7.6.0 (Linux 5.10) #918

Closed
1 task done
TabulateJarl8 opened this issue Mar 9, 2021 · 5 comments
Closed
1 task done

APM doesn't work on Manjaro with NPM 7.6.0 (Linux 5.10) #918

TabulateJarl8 opened this issue Mar 9, 2021 · 5 comments

Comments

@TabulateJarl8
Copy link

Prerequisites

Description

APM does not work. I know for a fact that at least search, install, and apm --version don't work. list and remove do work. I've found some issues with this exact error, but their solutions don't work for me.

Steps to Reproduce

  1. Install atom on Manjaro (Linux 5.10) with sudo pacman -Syu atom
  2. Install a package in atom or from the command line, as an example you could do apm install teletype. This will error out

Expected behavior:

The package to be installed

Actual behavior:

I get this error when installing packages with apm install [package_name]:

node:internal/modules/cjs/loader:478
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './bin/npm-cli' is not defined by "exports" in /usr/lib/node_modules/npm/package.json
    at new NodeError (node:internal/errors:329:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:337:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:562:3)
    at resolveExports (node:internal/modules/cjs/loader:472:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:512:31)
    at Function.node_module._findPath (/usr/lib/node_modules/atom-package-manager/node_modules/asar-require/lib/require.js:141:32)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:909:27)
    at Function.resolve (node:internal/modules/cjs/helpers:98:19)
    at new Install (/usr/lib/node_modules/atom-package-manager/lib/install.js:53:34)
    at Object.run (/usr/lib/node_modules/atom-package-manager/lib/apm-cli.js:240:18) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Reproduces how often:

100% of the time

Versions

apm --version:

/usr/lib/node_modules/npm/lib/npm.js:135
      throw new TypeError('must call as: npm.load(callback)')
      ^

TypeError: must call as: npm.load(callback)
    at Object.load (/usr/lib/node_modules/npm/lib/npm.js:135:13)
    at getPythonVersion (/usr/lib/node_modules/atom-package-manager/lib/apm-cli.js:155:16)
    at printVersions (/usr/lib/node_modules/atom-package-manager/lib/apm-cli.js:94:12)
    at Object.run (/usr/lib/node_modules/atom-package-manager/lib/apm-cli.js:223:16)
    at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/bin/apm:9:30)
    at Module._compile (node:internal/modules/cjs/loader:1091:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1120:10)
    at Module.load (node:internal/modules/cjs/loader:971:32)
    at Function.Module._load (node:internal/modules/cjs/loader:812:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)

atom --version:

Atom    : 1.54.0
Electron: 6.1.12
Chrome  : 76.0.3809.146
Node    : 12.4.0

npm --version: 7.6.0

OS: Manjaro (KDE) with Linux 5.10 kernel

@TabulateJarl8
Copy link
Author

Update: When I downgrade npm to 6.14.11 it seems to work. Not sure if I should close the issue so I'm going to leave it open for now

@TabulateJarl8 TabulateJarl8 changed the title APM doesn't work on Manjaro (Linux 5.10) APM doesn't work on Manjaro with NPM 7.6.0 (Linux 5.10) Mar 10, 2021
@aminya
Copy link
Contributor

aminya commented Mar 15, 2021

Are you using the official binaries downloaded from atom.io or it is an unofficial unsupported Atom?

https://atom.io/

@senyaak
Copy link

senyaak commented Mar 15, 2021

+1 downgrade npm to 6.14.11 didn't help

@TabulateJarl8
Copy link
Author

Are you using the official binaries downloaded from atom.io or it is an unofficial unsupported Atom?

https://atom.io/

I think I remember seeing some issue that said the atom package in the official arch repositories isn't actually official, which is what I am using currently. I tried to build it from source and use that but if i remember correctly I was some issue with apm or packages. I'll try again today and tell you how it goes

@TabulateJarl8
Copy link
Author

I was having trouble building it from source this time, but I got it to work with the latest version of NPM. What I did was download the deb from https://atom.io and converted it to an arch package with the debtap program. After installing debtap, you should run sudo debtap -u and then debtap path/to/atom.deb. Input the packager name and MIT for the license, and when it asks you if you want to edit the PKGINFO file, select your text editor. Now you need to remove 2 dependencies, kde-runtime and tuxedo-control-center, and then save the PKGINFO file. After it finishes making the package, just run sudo pacman -U path/to/atom.pkg.tar.zst to install atom.

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

No branches or pull requests

3 participants