H
Homarr14mo ago
Xum

Build from source issues

Hello, I would like to build from source, I've installed latest lts versions of node /npm on a debian 11 machine. I'm following these instructions from the documentation and I also copied the env.example to .env and generated and added the nextauthkey as specified in the file.
Clone the Repository using git clone https://github.com/ajnart/homarr.git
Enter the created directory using cd homarr
Install all dependencies using npm install
Build the source using npm build
Start the NextJS web server using npm start
Alternatively, use npm run dev to run a live development server
Clone the Repository using git clone https://github.com/ajnart/homarr.git
Enter the created directory using cd homarr
Install all dependencies using npm install
Build the source using npm build
Start the NextJS web server using npm start
Alternatively, use npm run dev to run a live development server
The npm install command is throwing some errors related to the versioning of i18next. So I do npm install --legacy-peer-deps instead. But then during npm start I'm getting error like this:
}
},
data: {
code: 'INTERNAL_SERVER_ERROR',
httpStatus: 500,
path: 'user.count',
zodError: null
},
name: 'TRPCClientError'
},
elapsedMs: 582
}
Error [TRPCClientError]: no such table: user
at TRPCClientError.from (file:///root/homarr/.next/server/src/middleware.js:2202:20)
at <unknown> (file:///root/homarr/.next/server/src/middleware.js:2757:60)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}
},
data: {
code: 'INTERNAL_SERVER_ERROR',
httpStatus: 500,
path: 'user.count',
zodError: null
},
name: 'TRPCClientError'
},
elapsedMs: 582
}
Error [TRPCClientError]: no such table: user
at TRPCClientError.from (file:///root/homarr/.next/server/src/middleware.js:2202:20)
at <unknown> (file:///root/homarr/.next/server/src/middleware.js:2757:60)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
This looks like the issue is related to the database server. Do I need to initialize a db server somehow? The .env specifications are default and it seems to create a db file within /database. I also looked into the scripts folder and there is a run.sh, which has some db migration thingies for yarn, I converted them to npm and giving a try but that was just a hopeless try and didnt do anything. Please advise if there is a known solution or how to further debug. Thanks.
6 Replies
Serenaphic
Serenaphic14mo ago
Latest doesn't have a user database, I think you are deploying dev. If that's what you want then yes you might need to run the migration script, but that's not documented yet as this is in development. Either make sure that your are actually pulling from latest and no dev, or try running that script. I'm not the one that developed that part so I'm unsure how it need to be done, but the instructions I got were to run the command
yarn db:migrate
yarn db:migrate
from the root folder of homarr @Null Alternatively
yarn ts-node src/migrate.ts
yarn ts-node src/migrate.ts
Looking at the run.sh, it seems that this is the command you might have already tried actually
Xum
XumOP14mo ago
This is helpful. Yes, I didnt switch branches and looks like the default is dev branch. By latest do you mean the master branch? Running build from master branch is also failing. Looking to see how or if I can fix this without any code change.
root@homarr:~/homarr# npm run build

> next build

- info Linting and checking validity of types ..- error ESLint: ESLint configuration in package.json is invalid: - Unexpected top-level property "ignoreDuringBuilds".
- info Linting and checking validity of types ..Failed to compile.

./src/widgets/calendar/CalendarTile.tsx:108:7
Type error: Type '{ defaultDate: Date; onPreviousMonth: Dispatch<SetStateAction<Date>>; onNextMonth: Dispatch<SetStateAction<Date>>; ... 10 more ...; renderDay: (date: Date) => Element; }' is not assignable to type 'IntrinsicAttributes & Pick<CalendarProps, "right" | "left" | "id" | "hidden" | "suppressHydrationWarning" | "className" | "color" | "lang" | ... 352 more ... | "onPreviousMonth"> & RefAttributes<...>'.
Property 'hasNextLevel' does not exist on type 'IntrinsicAttributes & Pick<CalendarProps, "right" | "left" | "id" | "hidden" | "suppressHydrationWarning" | "className" | "color" | "lang" | ... 352 more ... | "onPreviousMonth"> & RefAttributes<...>'.

106 | date={month}
107 | maxLevel="month"
> 108 | hasNextLevel={false}
| ^
109 | styles={{
110 | calendarHeader: {
111 | maxWidth: 'inherit',
- info Linting and checking validity of types ...
root@homarr:~/homarr# npm run build

> next build

- info Linting and checking validity of types ..- error ESLint: ESLint configuration in package.json is invalid: - Unexpected top-level property "ignoreDuringBuilds".
- info Linting and checking validity of types ..Failed to compile.

./src/widgets/calendar/CalendarTile.tsx:108:7
Type error: Type '{ defaultDate: Date; onPreviousMonth: Dispatch<SetStateAction<Date>>; onNextMonth: Dispatch<SetStateAction<Date>>; ... 10 more ...; renderDay: (date: Date) => Element; }' is not assignable to type 'IntrinsicAttributes & Pick<CalendarProps, "right" | "left" | "id" | "hidden" | "suppressHydrationWarning" | "className" | "color" | "lang" | ... 352 more ... | "onPreviousMonth"> & RefAttributes<...>'.
Property 'hasNextLevel' does not exist on type 'IntrinsicAttributes & Pick<CalendarProps, "right" | "left" | "id" | "hidden" | "suppressHydrationWarning" | "className" | "color" | "lang" | ... 352 more ... | "onPreviousMonth"> & RefAttributes<...>'.

106 | date={month}
107 | maxLevel="month"
> 108 | hasNextLevel={false}
| ^
109 | styles={{
110 | calendarHeader: {
111 | maxWidth: 'inherit',
- info Linting and checking validity of types ...
I disabled eslinting according to these instructions but still getting the error on the calendar widget. https://nextjs.org/docs/app/api-reference/next-config-js/eslint If anyone knows exact working steps to build latest from source, please share.
Manicraft1001
Manicraft100114mo ago
Do not run using npm. Use yarn instead. npm is ancient
Xum
XumOP14mo ago
Using yarn worked. Thanks!
Serenaphic
Serenaphic14mo ago
No I meant latest, in this case it would be v0.13.4. If you got it to work with dev then great but remember that it is a work in progress and unstable
Xum
XumOP14mo ago
yes got it working after some fiddling with dependency versions. But now switching to latest. Thanks for the help.
Want results from more Discord servers?
Add your server