basst85 / NextRemoteJs

Simple webinterface for the Ziggo Next setopbox
13 stars 4 forks source link

Install Error #13

Closed Anjerlaan closed 3 years ago

Anjerlaan commented 3 years ago

Hi @basst85,

I am trying to install (update from previous version) but I get an error. Note: I first have deleted my previous install directory "home/pi/Ziggo" and then performed the following steps:

pi@NodeRED-Pi:~ $ mkdir Ziggo
pi@NodeRED-Pi:~ $ cd Ziggo/
pi@NodeRED-Pi:~/Ziggo $ git clone https://github.com/basst85/NextRemoteJs.git
Cloning into 'NextRemoteJs'...
remote: Enumerating objects: 86, done.
remote: Counting objects: 100% (86/86), done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 121 (delta 42), reused 58 (delta 19), pack-reused 35
Receiving objects: 100% (121/121), 30.25 KiB | 2.16 MiB/s, done.
Resolving deltas: 100% (56/56), done.
pi@NodeRED-Pi:~/Ziggo $ npm install
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/Ziggo/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/Ziggo/package.json'
npm WARN Ziggo No description
npm WARN Ziggo No repository field.
npm WARN Ziggo No README data
npm WARN Ziggo No license field.

up to date in 1.121s
found 0 vulnerabilities

pi@NodeRED-Pi:~/Ziggo $ cd NextRemoteJs
pi@NodeRED-Pi:~/Ziggo/NextRemoteJs $ npm start

> nextremotejs@1.0.1 start /home/pi/Ziggo/NextRemoteJs
> node index.js

internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module 'winston'
Require stack:
- /home/pi/Ziggo/NextRemoteJs/lib/logger.js
- /home/pi/Ziggo/NextRemoteJs/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    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> (/home/pi/Ziggo/NextRemoteJs/lib/logger.js:1:17)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/pi/Ziggo/NextRemoteJs/lib/logger.js',
    '/home/pi/Ziggo/NextRemoteJs/index.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nextremotejs@1.0.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nextremotejs@1.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2021-04-11T11_44_41_174Z-debug.log
pi@NodeRED-Pi:~/Ziggo/NextRemoteJs $ 

This is the Log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@6.14.8
3 info using node@v12.20.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle nextremotejs@1.0.1~prestart: nextremotejs@1.0.1
6 info lifecycle nextremotejs@1.0.1~start: nextremotejs@1.0.1
7 verbose lifecycle nextremotejs@1.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle nextremotejs@1.0.1~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/Ziggo/NextRemoteJs/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle nextremotejs@1.0.1~start: CWD: /home/pi/Ziggo/NextRemoteJs
10 silly lifecycle nextremotejs@1.0.1~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle nextremotejs@1.0.1~start: Returned: code: 1  signal: null
12 info lifecycle nextremotejs@1.0.1~start: Failed to exec start script
13 verbose stack Error: nextremotejs@1.0.1 start: `node index.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:314:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:314:20)
13 verbose stack     at maybeClose (internal/child_process.js:1022:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid nextremotejs@1.0.1
15 verbose cwd /home/pi/Ziggo/NextRemoteJs
16 verbose Linux 5.4.72-v7+
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v12.20.0
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error nextremotejs@1.0.1 start: `node index.js`
22 error Exit status 1
23 error Failed at the nextremotejs@1.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

What can I do about this?

basst85 commented 3 years ago

@Anjerlaan Hi!

It looks like you didn't run the npm install command inside the NextRemoteJs directory. The necessary package.json file is inside this directory.

Anjerlaan commented 3 years ago

@Anjerlaan Hi!

It looks like you didn't run the npm install command inside the NextRemoteJs directory. The necessary package.json file is inside this directory.

Correct, working now! this is not clear in the readme file