DustinBrett / daedalOS

Desktop environment in the browser
https://dustinbrett.com
MIT License
8.65k stars 689 forks source link

Error when building docker #484

Closed halcyonforever closed 1 day ago

halcyonforever commented 1 day ago

When running the docker build command I get the following error:

306.5 error minimatch@10.0.1: The engine "node" is incompatible with this module. Expected version "20 || >=22". Got "21.7.3" 306.5 error Found incompatible module.

It's an issue with the yarn package because the installed version of node is v23.1.0 daedalOS# node --version v23.1.0

I checked the package.js file and it calls for Node version 22, but I can't seem to force it to get the right version.

Environment: New Hyper-V VM Ubuntu 24.0.1 LTS node, nvm, npm, and yarn on latest version.

I tried running it locally and got this error:

`root@orb:~/daedalOS# yarn build yarn run v1.22.22 $ yarn build:prebuild && next build $ node scripts/robots.js && node scripts/rssBuilder.js && node scripts/searchIndex.js && node scripts/preloadIcons.js && node scripts/cacheShortcuts.js && yarn build:fs $ node scripts/fs2json.js --exclude .index --out public/.index/fs.9p.json ./public Creating file tree ... Creating json ... ▲ Next.js 15.0.2

✓ Linting and checking validity of types Creating an optimized production build ...

[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies `
DustinBrett commented 1 day ago

I've updated Docker to Node 22 and locally tested it and it worked. As for the yarn build issue, I am not as sure what is going on there that is giving you the Unable to snapshot resolve dependencies error.

halcyonforever commented 1 day ago

Thanks for looking into it. I'm trying it again now on a fresh VM.

DustinBrett commented 1 day ago

Thanks for looking into it. I'm trying it again now on a fresh VM.

Ok great thanks! I just pushed the Docker update. Keep me posted.

halcyonforever commented 1 day ago

Steps taken: Fresh install of Ubuntu 24 LTS - downloaded iso 2024-10-29 server installs of openssh, docker

sudo -i

Add Docker's official GPG key:

sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc

Add the repository to Apt sources:

echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

download and install Node.js (you may need to restart the terminal)

nvm install 22

node --version v22.11.0

Installing Yarn curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt update && sudo apt install yarn

Clone the Repository git clone https://github.com/DustinBrett/daedalOS.git cd daedalOS export NODE_OPTIONS=--openssl-legacy-provider

docker build -t daedalos . ✓ Compiled successfully docker run -dp 3000:3000 --rm --name daedalos daedalos

And success. The docker change fixed it for that!