Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bin/node is not found (truenas core) #1

Open
profzelonka opened this issue Dec 20, 2021 · 6 comments
Open

bin/node is not found (truenas core) #1

profzelonka opened this issue Dec 20, 2021 · 6 comments

Comments

@profzelonka
Copy link

Hey is there any way I can run this with Plex installed on TrueNAS/FreeNAS? I just want to copy the metadata and images to the data folders, I don't get why Plex made it so hard not to lol

When I run run_once.sh it tells me the path for node isn't found.

@estallio
Copy link
Owner

It looks like you haven't installed nodeJS. Try to install node or run the Docker version.

@profzelonka
Copy link
Author

profzelonka commented Dec 21, 2021

I install node 16.6.2 and npm but something isn't playing nice

root@plex:/usr/local/plexdata-plexpass/Plex Media Server/plex-metadata-exporter-master/app # npm install
npm WARN [email protected] No repository field.

audited 3 packages in 0.256s

1 package is looking for funding
run npm fund for details

found 0 vulnerabilities

root@plex:/usr/local/plexdata-plexpass/Plex Media Server/plex-metadata-exporter-master/app # npm fund
[email protected]
└─┬ https://github.com/sponsors/RubenVerborgh
└── [email protected]

root@plex:/usr/local/plexdata-plexpass/Plex Media Server/plex-metadata-exporter-master/app # npm run start

[email protected] start /usr/local/plexdata-plexpass/Plex Media Server/plex-metadata-exporter-master/app
node index.js

/usr/local/plexdata-plexpass/Plex Media Server/plex-metadata-exporter-master/app/index.js:9
const plexRootFolder = process.env.PLEX_ROOT_FOLDER.replace(//$/, ''); // remove trailing slash
^

TypeError: Cannot read property 'replace' of undefined
at Object. (/usr/local/plexdata-plexpass/Plex Media Server/plex-metadata-exporter-master/app/index.js:9:53)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-12-21T16_30_23_995Z-debug.log

Below are the contents of the log: /root/.npm/_logs/2021-12-21T16_30_23_995Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 info lifecycle [email protected]
start: [email protected]
7 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/plexdata-plexpass/Plex Media Server/plex-metadata-exporter-master/app/node_modules/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
9 verbose lifecycle [email protected]start: CWD: /usr/local/plexdata-plexpass/Plex Media Server/plex-metadata-exporter-master/app
10 silly lifecycle [email protected]
start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle [email protected]start: Returned: code: 1 signal: null
12 info lifecycle [email protected]
start: Failed to exec start script
13 verbose stack Error: [email protected] start: node index.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (node:events:394:28)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (node:events:394:28)
13 verbose stack at maybeClose (node:internal/child_process:1067:16)
13 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
14 verbose pkgid [email protected]
15 verbose cwd /usr/local/plexdata-plexpass/Plex Media Server/plex-metadata-exporter-master/app
16 verbose FreeBSD 12.2-RELEASE-p10
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
18 verbose node v16.6.2
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: node index.js
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@estallio
Copy link
Owner

Looks like Node can't read the ENV-vars. Get sure you've configured the ENV-vars correctly and start the script in a again proper way.

@profzelonka
Copy link
Author

Ah yes, you're right, thank you. Am I doing something wrong for the path?

My plex root path is: /usr/local/plexdata-plexpass/Plex\ Media\ Server/
And my configured file ending is: bzz_plex

[Error: ENOENT: no such file or directory, open '/usr/local/plexdata-plexpass/Plex\ Media\ Server/Plex Library-plex-library-bzz_plex.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/usr/local/plexdata-plexpass/Plex\ Media\ Server/Plex Library-plex-library-bzz_plex.json'
}

Not sure what "Plex Library-plex-library-[file_ending].json" is but it's not an existing file - Am I missing something?

@profzelonka
Copy link
Author

profzelonka commented Dec 22, 2021

Never mind, user error! Changed to just / and now it worked, but only for one of my Plex libraries as it breaks at the 94%~ mark of my first library..

(IP and token edited)

node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^

<ref *1> Error: connect ECONNREFUSED 192.168.IP.IP:80
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1142:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '192.168.IP.IP',
port: 80,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [Function: httpAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
headers: {
Accept: 'application/json, text/plain, /',
'User-Agent': 'axios/0.24.0'
},
responseType: 'stream',
method: 'get',
url: 'http://192.168.IP.IP:32400undefined?X-Plex-Token=[MYTOKEN]',
data: undefined
},
request: <ref *3> Writable {
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError]
},
_eventsCount: 2,
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: 10485760,
protocol: 'http:',
path: '/:32400undefined?X-Plex-Token=[MYTOKEN]',
method: 'GET',
headers: {
Accept: 'application/json, text/plain, /',
'User-Agent': 'axios/0.24.0'
},
agent: undefined,
agents: { http: undefined, https: undefined },
auth: undefined,
hostname: '192.168.IP.IP',

I don't care so much, if there's a way for me to specify which library to do instead of all? (Counting, issue won't occur early in next library process.)

@estallio
Copy link
Owner

Hmm, looks like there is an undefined path somewhere. Most likely that's an edge case I did't encounter during development. If you like to, feel free to fix it and submit a pull request.

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

No branches or pull requests

2 participants