Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
Description
I am using Dify 1.10.1->fix.1 deployed locally via Docker Compose. I need to use the Code Execution node to run JavaScript code and generate charts with the ECharts library, but I cannot find a valid way to install the ECharts npm package in the Dockerized code-executor environment.
I have tried:
Installing ECharts directly via npm install echarts in the Code Execution node (fails, no persistent installation)
Modifying the docker-compose.yml and code-executor Dockerfile to add npm installation commands (no effect, container rebuilds do not persist dependencies)
Checking official documentation and community issues (no clear guide for JS library installation in Docker deployment)
Core Requirement
I need an official, reliable solution to:
Install the ECharts (JavaScript) npm package globally/persistently in the Dify code-executor container
Use const echarts = require('echarts') normally in the Code Execution node to generate charts
Ensure the installation persists after docker compose down && docker compose up -d
2. Additional context or comments
Could you please provide:
Step-by-step commands to install ECharts for the code-executor service in Docker local deployment
Official recommended configuration (Dockerfile / docker-compose.yml / volume mounts) for persistent npm package installation
A minimal working JavaScript code example for ECharts in the Code Execution node
This will help many users who need to use visualization libraries (ECharts, Chart.js, etc.) in Dify's code execution feature.
Thank you very much for your support!
3. Can you help us with this feature?
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
Description
I am using Dify 1.10.1->fix.1 deployed locally via Docker Compose. I need to use the Code Execution node to run JavaScript code and generate charts with the ECharts library, but I cannot find a valid way to install the ECharts npm package in the Dockerized code-executor environment.
I have tried:
Installing ECharts directly via npm install echarts in the Code Execution node (fails, no persistent installation)
Modifying the docker-compose.yml and code-executor Dockerfile to add npm installation commands (no effect, container rebuilds do not persist dependencies)
Checking official documentation and community issues (no clear guide for JS library installation in Docker deployment)
Core Requirement
I need an official, reliable solution to:
Install the ECharts (JavaScript) npm package globally/persistently in the Dify code-executor container
Use const echarts = require('echarts') normally in the Code Execution node to generate charts
Ensure the installation persists after docker compose down && docker compose up -d
2. Additional context or comments
Could you please provide:
Step-by-step commands to install ECharts for the code-executor service in Docker local deployment
Official recommended configuration (Dockerfile / docker-compose.yml / volume mounts) for persistent npm package installation
A minimal working JavaScript code example for ECharts in the Code Execution node
This will help many users who need to use visualization libraries (ECharts, Chart.js, etc.) in Dify's code execution feature.
Thank you very much for your support!
3. Can you help us with this feature?