Open jaqarrick opened 5 months ago
Having the same issue, is there any solution or workaround which does not require to downgrade?
[EDIT]
A temporary fix is to "manually" install the missing dependency during the deployment.
Have similar issue but with @css-inline/css-inline-freebsd-x64
Unfortunately, I can't find dependency to install it temporary
Try to just npm remove @nestjs-modules/mailer
then npm i @nestjs-modules/mailer
It worked for me
That didn't work unfortunately.
Also tried manually installing the missing dependency and got
yarn add @css-inline/css-inline-linux-arm64-musl
...
error @css-inline/css-inline-linux-arm64-musl@0.14.1: The platform "darwin" is incompatible with this module.
error Found incompatible module.
Hello @jaqarrick, I think I figured out the issue.
Go to the files directory inside your docker and confirm if the files were mounted. Example of files that is not mounted is below otherwise you will see mount:
If it is mounted, then you will need to remove volumes from your app service in the docker-compose.yml file. Sample of my file is below:
version: '3.8'
services:
postgres:
image: postgres
restart: always
env_file:
- .env
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- '5434:5432'
volumes:
- goeliteapp:/var/lib/postgresql/data
app:
build:
context: .
dockerfile: Dockerfile
depends_on:
- postgres
container_name: api-project
working_dir: /app
restart: always
env_file:
- .env
environment:
ENVIRONMENT: ${ENVIRONMENT}
PORT: 3000
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?schema=public
ports:
- "3030:3000"
command: ["/bin/sh", "-c", "./entrypoint.sh"] #This is because I am using a script
volumes:
goeliteapp:
Also, include the below in your .dockerignore .DS_Store /src/.DS_Store
After that, run the below commands and your docker will work properly:
docker compose down
docker compose build build --no-cache
docker compose up
@jaqarrick just add this to your package.json
"optionalDependencies": {
"@css-inline/css-inline-linux-arm64-musl": "0.14.1"
}
Encountering the same issue. I'm trying to run my Nest.JS project locally using Docker, hostmachine is Intel Mac, Docker version is node:20-alpine.
Reverting to 1.10.3 works but not a long-term solution due to security issues in older versions. Adding optionalDependencies like @kerimovok suggestud does not work either.
If someone could help in providing a solution that would be great! I'm happy to assist where needed.
@jaqarrick How did you end up handling the issue?
Not idea, but I ended up forking the package and adding the module directly in my repo. This allowed me to manually upgrade and manage the dependencies. @Matisds
I just install it as one of the steps in my Dockerfile
...
# Step 5: Install dependencies
RUN npm install
# Adding temporarily due to update failed on @nestjs-modules/mailer
RUN npm install @css-inline/css-inline-linux-x64-musl
# Step 6: Copy the rest of the application code
COPY . .
# Step 7: Build the NestJS app
RUN nest build
...
Describe the bug When I am starting my nest app I see the following error:
This occurred after upgrading to
2.0.2
of@nestjs-modules/mailer
I am usingv18.19.0
of nodeThere are a couple closed versions of this issue or a similar one (#1128 and #1146) but the solution listed there is to downgrade the package or the node version.
Older versions of the mailer package have critical security vulnerabilities by requiring
vm2
for example. So a better solution is needed.