I’m trying to run my development install on my Linux laptop.
I have a script that gets versions for Ruby, imagemagick, and nodejs from discourse_docker and sets them with asdf
. Here’s a piece of it:
RUBY_VERSION=$(grep "^ARG RUBY_VERSION" $DISCOURSE_DOCKER_SRC/image/base/slim.Dockerfile |cut -d'=' -f2)
echo "GOT RUBY VERSION!! $RUBY_VERSION"
asdf install ruby $RUBY_VERSION
asdf global ruby $RUBY_VERSION
IMAGE_MAGICK_VERSION=$(grep -e ^IMAGE_MAGICK_VERSION ~/src/discourse-repos/discourse_docker/image/base/install-imagemagick|cut -d'"' -f2)
echo "GOT IMAGE_MAGICK_VERSION: $IMAGE_MAGICK_VERSION"
asdf install imagemagick $IMAGE_MAGICK_VERSION
asdf global imagemagick $IMAGE_MAGICK_VERSION
# 2023-04-24 debian and pop!os have different nodejs versions
NODE_VERSION=$(docker run discourse/base:release bash -c 'node --version'|cut -d'v' -f2)
#NODE_VERSION=$(grep node ~/src/discourse-repos/discourse/.tool-versions|awk '{print $2}')
echo "GOT NODEJS version: $NODE_VERSION"
asdf install nodejs $NODE_VERSION
asdf global nodejs $NODE_VERSION
But when I run bin/ember-cli
I get this:
./bin/ember-cli
warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
error ember-template-lint@6.0.0: The engine "node" is incompatible with this module. Expected version "^18.18.0 || ^20.9.0 || >=21.1.0". Got "18.17.1"
error Found incompatible module.
18.17.1 is the version in Discourse. Why do I need a different version for development than Discourse is running?
When I update to 18.18.0 and then run ember-cli
I get a “SyntaxError: Unexpected token in JSON at position 219260” . . . something I can’t quite make sense of.
Now what do I try?
Is there some reliable way to see that my development environment is appropriate for doing development? It seems that once a month I spend an hour or more trying to make my development system work at all. Do people (like @sam and @falco) really use the docker development environment? Maybe I should target that container to get versions of Ruby and Node?