[Bug]: Service broken after last update #928

Closed
opened 2026-04-24 23:26:27 +02:00 by adam · 6 comments
Owner

Originally created by @hellofaduck on GitHub (Feb 1, 2023).

Describe the issue

After updating to the last version service wont starting at all and I got this logs:

Feb 01 19:58:56 audiobookshelf systemd[1]: Started Self-hosted audiobook server for managing and playing audiobooks.
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: node:internal/modules/cjs/loader:960
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:   const err = new Error(`Cannot find module '${request}'`);
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:               ^
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: Error: Cannot find module '/snapshot/audiobookshelf/node_modules/axios/dist/node/axios.cjs'
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: 1) If you want to compile the package/file into executable, please pay attention to compilation warnings>
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at resolveExports (node:internal/modules/cjs/loader:482:14)
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at Function._resolveFilename (pkg/prelude/bootstrap.js:1912:46)
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at Module.require (node:internal/modules/cjs/loader:1005:19)
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at Module.require (pkg/prelude/bootstrap.js:1812:31)
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:     at require (node:internal/modules/cjs/helpers:102:18) {
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:   code: 'MODULE_NOT_FOUND',
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:   path: '/snapshot/audiobookshelf/node_modules/axios/package.json',
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]:   pkg: true
Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: }
Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Main process exited, code=exited, status=7/NOTRUNNING
Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Failed with result 'exit-code'.
Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Scheduled restart job, restart counter is at 5.
Feb 01 19:58:56 audiobookshelf systemd[1]: Stopped Self-hosted audiobook server for managing and playing audiobooks.
Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Start request repeated too quickly.
Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Failed with result 'exit-code'.
Feb 01 19:58:56 audiobookshelf systemd[1]: Failed to start Self-hosted audiobook server for managing and playing audiobooks.

Steps to reproduce the issue

Audiobookshelf version

2.2.13

How are you running audiobookshelf?

Debian/PPA

Originally created by @hellofaduck on GitHub (Feb 1, 2023). ### Describe the issue After updating to the last version service wont starting at all and I got this logs: ``` Feb 01 19:58:56 audiobookshelf systemd[1]: Started Self-hosted audiobook server for managing and playing audiobooks. Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: node:internal/modules/cjs/loader:960 Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: const err = new Error(`Cannot find module '${request}'`); Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: ^ Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: Error: Cannot find module '/snapshot/audiobookshelf/node_modules/axios/dist/node/axios.cjs' Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: 1) If you want to compile the package/file into executable, please pay attention to compilation warnings> Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15) Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15) Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at resolveExports (node:internal/modules/cjs/loader:482:14) Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at Function.Module._findPath (node:internal/modules/cjs/loader:522:31) Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27) Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at Function._resolveFilename (pkg/prelude/bootstrap.js:1912:46) Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at Function.Module._load (node:internal/modules/cjs/loader:778:27) Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at Module.require (node:internal/modules/cjs/loader:1005:19) Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at Module.require (pkg/prelude/bootstrap.js:1812:31) Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: at require (node:internal/modules/cjs/helpers:102:18) { Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: code: 'MODULE_NOT_FOUND', Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: path: '/snapshot/audiobookshelf/node_modules/axios/package.json', Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: pkg: true Feb 01 19:58:56 audiobookshelf audiobookshelf[2704]: } Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Main process exited, code=exited, status=7/NOTRUNNING Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Failed with result 'exit-code'. Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Scheduled restart job, restart counter is at 5. Feb 01 19:58:56 audiobookshelf systemd[1]: Stopped Self-hosted audiobook server for managing and playing audiobooks. Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Start request repeated too quickly. Feb 01 19:58:56 audiobookshelf systemd[1]: audiobookshelf.service: Failed with result 'exit-code'. Feb 01 19:58:56 audiobookshelf systemd[1]: Failed to start Self-hosted audiobook server for managing and playing audiobooks. ``` ### Steps to reproduce the issue 1. ### Audiobookshelf version 2.2.13 ### How are you running audiobookshelf? Debian/PPA
adam added the bug label 2026-04-24 23:26:27 +02:00
adam closed this issue 2026-04-24 23:26:27 +02:00
Author
Owner

@babbycp commented on GitHub (Feb 1, 2023):

I had same issue. I am running Debian 9. Pretty sure your missing new dependency axios. I am going to be upgrading Distribution in next couple days and trying again.

@babbycp commented on GitHub (Feb 1, 2023): I had same issue. I am running Debian 9. Pretty sure your missing new dependency axios. I am going to be upgrading Distribution in next couple days and trying again.
Author
Owner

@derkington commented on GitHub (Feb 1, 2023):

Just ran into this on Ubuntu 22.04.1 LTS. Downgraded to version 2.2.12 for now.

@derkington commented on GitHub (Feb 1, 2023): Just ran into this on Ubuntu 22.04.1 LTS. Downgraded to version 2.2.12 for now.
Author
Owner

@lkiesow commented on GitHub (Feb 1, 2023):

The RPMs have the same problem.

I didn't solve it, but kind of found what's causing the problem. Seems like pkg fails to include some files. The build logs contain a number of warnings like this:

> Warning Failed to make bytecode node18-x64 for file /snapshot/audiobookshelf-2.2.13/node_modules/axios/index.js
@lkiesow commented on GitHub (Feb 1, 2023): The RPMs have the same problem. I didn't solve it, but kind of found what's causing the problem. Seems like `pkg` fails to include some files. The [build logs](https://github.com/lkiesow/audiobookshelf-rpm/actions/runs/4068538142/jobs/7007202708) contain a number of warnings like this: ``` > Warning Failed to make bytecode node18-x64 for file /snapshot/audiobookshelf-2.2.13/node_modules/axios/index.js ```
Author
Owner

@Deekerman commented on GitHub (Feb 1, 2023):

On Debian 11. Downgraded to 2.2.12 again.

@Deekerman commented on GitHub (Feb 1, 2023): On Debian 11. Downgraded to 2.2.12 again.
Author
Owner

@lkiesow commented on GitHub (Feb 1, 2023):

This is caused by a problem of pkg which is triggered by the upgrade of axios. Since pkg is used in when building the Debian packages and RPMs, 2.2.13 will be broken on these installs.

The Docker container does not use pkg and is not effected.

As a short-term fix to get things unbroken we can just get axios to the latest 0.x version.
Maybe we should move away from pkg for the packages in the future.

@lkiesow commented on GitHub (Feb 1, 2023): This is caused by a [problem of `pkg`](https://github.com/vercel/pkg/issues/1291) which is triggered by the [upgrade of axios](https://github.com/advplyr/audiobookshelf/pull/1364). Since `pkg` is used in when building the Debian packages and RPMs, 2.2.13 will be broken on these installs. The Docker container does not use `pkg` and is not effected. As a short-term fix to get things unbroken we can just get axios to the latest 0.x version. Maybe we should move away from `pkg` for the packages in the future.
Author
Owner

@advplyr commented on GitHub (Feb 1, 2023):

Fixed in v2.2.14

Thanks all. We may move away from pkg but in the meantime we'll test any library updates with pkg before releasing.

@advplyr commented on GitHub (Feb 1, 2023): Fixed in [v2.2.14](https://github.com/advplyr/audiobookshelf/releases/tag/v2.2.14) Thanks all. We may move away from `pkg` but in the meantime we'll test any library updates with `pkg` before releasing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#928