retypeapp / retype

Retype is an ✨ ultra-high-performance✨ static site generator that builds a website based on simple text files.
https://retype.com
Other
1.01k stars 201 forks source link

MojeeIO.Exceptions.LicenseException: Mojee License violation. #692

Open zylideum opened 2 months ago

zylideum commented 2 months ago

Description

When running Retype from any NPM source, retype start fails with error MojeeIO.Exceptions.LicenseException: Mojee License violation.

I noticed a similar issue: #578 except there's a slight different in verbage.

Reproduction

I'm attempting to build a Docker image with Retype using Node/NPM base images.

Start container: docker run --rm -it --platform=linux/amd64 node:slim bash

Install Retype: npm install retypeapp --global

Ensuring the dotnet globalization variable is set to avoid ICU package error: export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1

I ensure libssl-dev is installed and then run retype start to be met with:

image

I would love to use this project with the Pro version after getting this working but I don't think this is something I can troubleshoot much further. Would appreciate help here - thanks!

geoffreymcgill commented 2 months ago

Thanks for the report. I have no idea what would be causing this but I will investigate and try to reproduce.

zylideum commented 2 months ago

Appreciate the fast response. I noticed in the issue I linked that starting a Windows service seemed to resolve this as it was related to a .NET crypto issue, but all of my attempts even outside of Docker have been on Linux platforms so that's not exactly an option :)

For whatever reason, it works fine when doing npm install retypeapp --global/retype start directly on my M1 Mac, and it works fine with the .NET Docker setup provided in the Retype documentation, but does not work with Node-based images.

zylideum commented 2 months ago

More troubleshooting:

I confirmed that this seems to have something to do with potentially missing dependencies between libraries included in dotnet images vs. node images. I built an image with the following Dockerfile:

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS builder
WORKDIR /build
COPY . /build
RUN dotnet tool install retypeapp --tool-path /bin

and this works fine, I use: docker run --rm --init -p 5005:5000 -v $(pwd):/build/ --workdir /build dotnetpackage/retypelatest:latest retype start --host 0.0.0.0

and everything is up beautifully.

Changing the image to anything node-based and running npm fails, like so:

FROM node:latest as build
RUN apt-get update \
        && apt-get install -y libssl-dev \
        && apt-get install -y libgssapi-krb5-2
RUN export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
RUN npm install retypeapp --global

Running this with the same docker run command returns the error referenced in the original post.