thunderhub icon indicating copy to clipboard operation
thunderhub copied to clipboard

Just did the update to the latest version and now it won't start.

Open pcwd opened this issue 2 years ago • 5 comments

lightning@Lightning:~/thunderhub$ npm run start

[email protected] start cross-env NODE_ENV=production nest start

node:events:505 throw er; // Unhandled 'error' event ^

Error: spawn nest ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:476:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12) at onErrorNT (node:internal/child_process:476:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -2, code: 'ENOENT', syscall: 'spawn nest', path: 'nest', spawnargs: [ 'start' ] }

Node.js v17.6.0

pcwd avatar Apr 08 '22 03:04 pcwd

I had the same problem upgrading from 0.13.9 to 0.13.10 and from 0.13.10 to 0.13.11.

The problem stems from using npm run update or using sh ./scripts/updateToLatest.sh to perform the upgrade. There is a line in the code:

https://github.com/apotdevin/thunderhub/blob/815fd5bce621cfc03650ed45990b00cef37dd899/scripts/updateToLatest.sh#L27-L29

that seems to remove necessary modules to start thunderhub.

I just run npm install again to fix the issue. After that, npm run start works.

hazrulnizam avatar May 07 '22 15:05 hazrulnizam

Ran into the same issue, seems like a bug then @apotdevin

Environment

thunderhub@debian-nuc:~/thunderhub$ node --version
v17.9.0
thunderhub@debian-nuc:~/thunderhub$ npm --version
8.5.5

npm run update completes successfully, but systemctl start thunderhub.service results in

May 09 15:46:01 debian-nuc systemd[1]: Started Thunderhub.
May 09 15:46:01 debian-nuc npm[353994]: node:events:505
May 09 15:46:01 debian-nuc npm[353994]:       throw er; // Unhandled 'error' event
May 09 15:46:01 debian-nuc npm[353994]:       ^
May 09 15:46:01 debian-nuc npm[353994]: Error: spawn nest ENOENT
May 09 15:46:01 debian-nuc npm[353994]:     at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
May 09 15:46:01 debian-nuc npm[353994]:     at onErrorNT (node:internal/child_process:476:16)
May 09 15:46:01 debian-nuc npm[353994]:     at processTicksAndRejections (node:internal/process/task_queues:83:21)
May 09 15:46:01 debian-nuc npm[353994]: Emitted 'error' event on ChildProcess instance at:
May 09 15:46:01 debian-nuc npm[353994]:     at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
May 09 15:46:01 debian-nuc npm[353994]:     at onErrorNT (node:internal/child_process:476:16)
May 09 15:46:01 debian-nuc npm[353994]:     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
May 09 15:46:01 debian-nuc npm[353994]:   errno: -2,
May 09 15:46:01 debian-nuc npm[353994]:   code: 'ENOENT',
May 09 15:46:01 debian-nuc npm[353994]:   syscall: 'spawn nest',
May 09 15:46:01 debian-nuc npm[353994]:   path: 'nest',
May 09 15:46:01 debian-nuc npm[353994]:   spawnargs: [ 'start' ]
May 09 15:46:01 debian-nuc npm[353994]: }
May 09 15:46:01 debian-nuc npm[353994]: Node.js v17.9.0
May 09 15:46:01 debian-nuc systemd[1]: thunderhub.service: Main process exited, code=exited, status=1/FAILURE
May 09 15:46:01 debian-nuc systemd[1]: thunderhub.service: Failed with result 'exit-code'.

Mitigated by running npm install again (thanks @hazrulnizam )


> [email protected] prepare
> husky install

husky - Git hooks installed

added 897 packages, and audited 1862 packages in 5s

164 packages are looking for funding

TrezorHannes avatar May 09 '22 13:05 TrezorHannes

This can be fixed by moving @nestjs/cli from devDependencies to dependencies

abhiShandy avatar Dec 03 '22 11:12 abhiShandy

After running the updateToLatest.sh script try running Thunderhub with npm run start:prod:env

apotdevin avatar Dec 06 '22 13:12 apotdevin

After running the updateToLatest.sh script try running Thunderhub with npm run start:prod:env

Tried this with the latest update to 0.13.18 and it works.

npm run start:prod:env works while npm run start does not.

Perhaps the documentation at http://docs.thunderhub.io/installation/ can be updated to reflect this requirement.

hazrulnizam avatar Dec 07 '22 02:12 hazrulnizam