tidepool-org / uploader

An Electron app for uploading diabetes device data to Tidepool's backend
BSD 2-Clause "Simplified" License
118 stars 86 forks source link

Linux install #1535

Open gazhay opened 1 year ago

gazhay commented 1 year ago

Had a look at the other linux install issues here and none seemed to match the error I am having.

Ubuntu 22.04 LTS Git cloned repoistiory

```npm install````

fails with

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @mui/icons-material@5.8.4
npm ERR! Found: react@16.14.0
npm ERR! node_modules/react
npm ERR!   react@"16.14.0" from the root project
npm ERR!   peer react@">=16.8.0" from @emotion/react@11.9.3
npm ERR!   node_modules/@emotion/react
npm ERR!     @emotion/react@"11.9.3" from the root project
npm ERR!     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.9.3
npm ERR!     node_modules/@emotion/styled
npm ERR!       @emotion/styled@"11.9.3" from the root project
npm ERR!       3 more (@mui/material, @mui/system, @mui/styled-engine)
npm ERR!     3 more (@mui/material, @mui/system, @mui/styled-engine)
npm ERR!   14 more (@emotion/styled, @hot-loader/react-dom, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.0 || ^18.0.0" from @mui/icons-material@5.8.4
npm ERR! node_modules/@mui/icons-material
npm ERR!   @mui/icons-material@"5.8.4" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@18.2.0
npm ERR! node_modules/react
npm ERR!   peer react@"^17.0.0 || ^18.0.0" from @mui/icons-material@5.8.4
npm ERR!   node_modules/@mui/icons-material
npm ERR!     @mui/icons-material@"5.8.4" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/gaz/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gaz/.npm/_logs/2022-12-15T12_57_54_492Z-debug-0.log

Forcing react@18 to install just creates further dependency problems

gniezen commented 1 year ago

Hi there @gazhay ! Easiest way to get it running on Linux (without having to install a bunch of dependencies) is using docker: https://github.com/tidepool-org/uploader#docker-for-linux

If you don't want to use Docker, the first thing to do is to make sure you're using Node v16, preferably v16.14.2 (or just type nvm use if you have nvm installed). Remember to do a rm -rf node_modules && rm -rf app/node_modules when you change Node versions. Then install yarn using npm install -g yarn and run yarn instead of npm install, before running yarn dev to run Uploader.

You may also need to do sudo apt-get install libsecret-1-dev ffmpeg libudev-dev libusb-1.0-0-dev to get all the native modules built, assuming you already have the necessary compilers installed (sudo apt-get install build-essential).

Let me know if you run into any other issues.