"no such file or directory, open '/package.json'" when trying to fix federation through Docker #2422

Open
opened 2026-02-22 06:49:41 -05:00 by deekerman · 0 comments
Owner

Originally created by @poperigby on GitHub (May 22, 2020).

I'm trying to fix federation in my Dockerized PeerTube instance by following this:
https://docs.joinpeertube.org/#/maintain-tools?id=update-hostjs

I'm running this in Docker so I sudo docker exec -it peertube, and then when inside the container, I do NODE_CONFIG_DIR=/app/config NODE_ENV=production npm run reset-password -- -u target_username. The problem is, when I do that, I get this:

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-05-22T17_49_41_513Z-debug.log

So it can't find package.json, but package.json is in /app. How do I get it to see package.json?

Originally created by @poperigby on GitHub (May 22, 2020). I'm trying to fix federation in my Dockerized PeerTube instance by following this: https://docs.joinpeertube.org/#/maintain-tools?id=update-hostjs I'm running this in Docker so I `sudo docker exec -it peertube`, and then when inside the container, I do `NODE_CONFIG_DIR=/app/config NODE_ENV=production npm run reset-password -- -u target_username`. The problem is, when I do that, I get this: ``` npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-05-22T17_49_41_513Z-debug.log ``` So it can't find `package.json`, but `package.json` is in `/app`. How do I get it to see `package.json`?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PeerTube#2422
No description provided.