I’m trying to customize the Strapi left menu by using patch-package, but I can’t find how to apply the changes.
I’m using Strapi 4.24.2
First of all, I had the patch-package module and a script “postinstall: patch-package” in the package.json
Then I made some changes inside the “index-hDD1JNph.js” in the node_modules
After that I ran the command :
npx patch-package @strapi/admin
Finally, I ran
docker-compose build
docker-compose up
but I see no changes in the Strapi admin panel
package.json:
{
"name": "heritage-cms",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"dependencies": {
"@_sh/strapi-plugin-ckeditor": "^2.1.1",
"@strapi/plugin-color-picker": "^4.24.2",
"@strapi/plugin-documentation": "4.24.2",
"@strapi/plugin-i18n": "4.24.2",
"@strapi/plugin-seo": "^1.9.8",
"@strapi/plugin-users-permissions": "4.24.2",
"@strapi/provider-upload-cloudinary": "^4.25.0",
"@strapi/strapi": "4.24.2",
"cloudinary": "^2.2.0",
"mysql": "^2.18.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-is": "^18.3.1",
"react-router-dom": "5.3.4",
"strapi-gtm-module": "^0.0.5",
"strapi-plugin-cookie-manager": "^1.2.4",
"strapi-plugin-google-analytics": "^0.0.0",
"strapi-plugin-populate-deep": "^3.0.1",
"styled-components": "5.3.3"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "a7af0888-4778-46c2-9a6c-f1d1c2dffdb7"
},
"engines": {
"node": ">=18.0.0 <=20.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}
Dockerfile:
FROM node:18-alpine3.18
# Installing libvips-dev for sharp Compatibility
RUN apk update && apk add –no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev
ARG NODE_ENV=development
ENV NODE_ENV=${NODE_ENV}
WORKDIR /opt/
COPY package.json yarn.lock ./
RUN yarn config set network-timeout 600000 -g && yarn install
WORKDIR /opt/app
COPY . .
ENV PATH /opt/node_modules/.bin:$PATH
RUN chown -R node:node /opt/app
USER node
RUN ["yarn", "build"]
EXPOSE 1337
CMD ["yarn", "develop"]
docker-compose.yml:
services:
heritage-cms:
container_name: heritage-cms
build: .
env_file: .env
environment:
DATABASE_CLIENT: ${DATABASE_CLIENT}
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PORT: ${DATABASE_PORT}
JWT_SECRET: ${JWT_SECRET}
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
NODE_ENV: ${NODE_ENV}
volumes:
- ./config:/opt/app/config
- ./src:/opt/app/src
- ./package.json:/opt/package.json
- ./yarn.lock:/opt/yarn.lock
- ./.env:/opt/app/.env
- ./public/uploads:/opt/app/public/uploads
ports:
- "1337:1337"
networks:
- heritage-cms
depends_on:
- heritage-cmsDB
heritage-cmsDB:
container_name: heritage-cmsDB
platform: linux/amd64 #for platform error on Apple M1 chips
env_file: .env
image: mysql:8.3.0
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_DATABASE: ${DATABASE_NAME}
volumes:
- ./mysql-init-scripts:/docker-entrypoint-initdb.d/heritage_dump
- heritage-cms-data:/var/lib/mysql
ports:
- "3306:3306"
networks:
- heritage-cms
heritage-cmsAdminer:
container_name: heritage-cmsAdminer
image: adminer
ports:
- "9090:8080"
environment:
- ADMINER_DEFAULT_SERVER=heritage-cmsDB
networks:
- heritage-cms
depends_on:
- heritage-cmsDB
volumes:
heritage-cms-data:
networks:
heritage-cms:
name: Heritage-cms
driver: bridge