Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Service not starting - ERR_PACKAGE_PATH_NOT_EXPORTED #105

Open
imp1sh opened this issue Mar 23, 2022 · 0 comments
Open

Service not starting - ERR_PACKAGE_PATH_NOT_EXPORTED #105

imp1sh opened this issue Mar 23, 2022 · 0 comments

Comments

@imp1sh
Copy link

imp1sh commented Mar 23, 2022

PRETTY_NAME="Rocky Linux 8.5 (Green Obsidian)"

Running puppet it gives no error but the service does not come up. This is what happens when I try to start the service:

[etherpad@pad ~]$ cd /opt/etherpad/
[etherpad@pad ~]$ ./bin/run.sh 
Ensure that all dependencies are up to date...  If this is the first time you have run Etherpad please be patient.
audited 630 packages in 2.44s

14 packages are looking for funding
  run `npm fund` for details

found 73 vulnerabilities (13 low, 23 moderate, 28 high, 9 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
Ensure jQuery is downloaded and up to date...
Clearing minified cache...
Ensure custom css/js files are created...
Started Etherpad...
internal/modules/cjs/loader.js:430
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/npm.js' is not defined by "exports" in /opt/etherpad/src/node_modules/npm/package.json
    at throwExportsNotFound (internal/modules/esm/resolve.js:299:9)
    at packageExportsResolve (internal/modules/esm/resolve.js:522:3)
    at resolveExports (internal/modules/cjs/loader.js:424:36)
    at Function.Module._findPath (internal/modules/cjs/loader.js:464:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:802:27)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/opt/etherpad/src/node/server.js:39:11)
    at Module._compile (internal/modules/cjs/loader.js:999:30) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

This is my puppet config:

  # Etherpad
  ensure_packages('git', { ensure => 'installed' })
  class { 'nodejs': }
  class { 'etherpad':
    ensure            => 'latest',
    service_name      => 'etherpad',
    service_ensure    => 'running',
    database_type     => 'postgres',
    ip                => '127.0.0.1',
    port              => $port,
    plugins_list      => {
      ep_mypads       => true,
    },
    database_name     => 'etherpad',
    database_user     => 'etherpad',
    database_password => $_postgresql_padpw,
    users             => {
      admin => {
        password => $adminpw,
        is_admin => true,
      },
    },
  }

Edit:
Just found out that the git repo landed on 275f1b1fef88333b0d8a0bcc1f36fe28f244add9 which is really old.
When I set ensure to a very recent hash then it's working.

Why is ensure -> 'present' or even 'latest' installing such an old version?

@imp1sh imp1sh changed the title Service not starging - ERR_PACKAGE_PATH_NOT_EXPORTED Service not starting - ERR_PACKAGE_PATH_NOT_EXPORTED Mar 23, 2022
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

1 participant