headplane icon indicating copy to clipboard operation
headplane copied to clipboard

Issues installing it in bare metal VM

Open appleimperio opened this issue 1 year ago • 3 comments

I install Nodejs clone the repository but when I run npm install I get the following errors

root@headscale:~/headplane# npm install
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: headplane@undefined
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"19.0.0-rc-f38c22b244-20240704" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@">=16.8.0" from @dnd-kit/[email protected]
npm error node_modules/@dnd-kit/core
npm error   @dnd-kit/core@"^6.1.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /root/.npm/_logs/2024-09-26T00_06_39_375Z-eresolve-report.txt
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-09-26T00_06_39_375Z-debug-0.log

I try Node version 20 and with the latest v21.7.3 same problem. The npm version is 10.8.3

Am I missing something? Thank You!

appleimperio avatar Sep 26 '24 00:09 appleimperio

Try --force or --legacy-peer-deps either or. Unfortunately I'm currently using React 19 for its compiler and a lot of dependencies are very angry about it.

tale avatar Sep 26 '24 04:09 tale

Thank you. that worked but after finishing the installation and write npm start. I'm getting this error.

root@headscale:~/headplane# npm start

> start
> remix-serve ./build/server/index.js

(node:2163) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error: COOKIE_SECRET not set
    at loadContext (file:///root/headplane/build/server/index.js?t=1727314598407.829:701:11)
    at file:///root/headplane/build/server/index.js?t=1727314598407.829:793:1

this is my .env configuration

ROOT_API_KEY=y8szbFY7OjSHnaFrh99Fqa8Ums2Kgdyk7sQ/koQaCUs
COOKIE_SECRET=uH6C3RLFzuoMPsJWidV1tTdSDD3xOuupTQVPYHlmuY
DISABLE_API_KEY_LOGIN=true
HOST=0.0.0.0
PORT=5000
CONFIG_FILE=/etc/headscale/config.yaml
#HEADSCALE_INTEGRATION=proc

The ROOT_API_KEY and COOKIE_SECRET are just random numbers and letters. I try it with and without the HEADSCALE_INTEGRATION variable same issue.

appleimperio avatar Sep 26 '24 10:09 appleimperio

It doesn't read the .env file on its own. You'll need to load that separately. So for example you could source .env and then npm start. Generally bare-metal isn't a supported or recommended way to deploy, so these kind of things are expected to be handled.

tale avatar Sep 26 '24 14:09 tale

Closed as duplicate of #45

tale avatar Nov 07 '24 18:11 tale