本地运行Hyperledger Composer Playground报错:TypeError问题求助
TypeError: Cannot read property 'engine' of undefined in Hyperledger Composer Playground Hey there, let's work through this error you're hitting when running Hyperledger Composer Playground locally with Docker. Based on your environment details and the logs provided, here are actionable steps to resolve the issue:
1. Clean Up Stale Docker Resources
Residual containers, volumes, or images often cause unexpected state issues. Let's start with a clean slate:
- Stop all running Docker containers:
docker stop $(docker ps -aq) - Remove all stopped containers, unused volumes, and old images (back up any important blockchain data first!):
docker rm $(docker ps -aq) docker volume prune -f docker image prune -af - Re-deploy your Hyperledger Composer environment following the tutorial steps.
2. Reset the Composer Card Store
From your logs, the card store is located at /home/composer/.composer/cards inside the container. Corrupted card files can trigger this error:
- Access the running Composer Playground container:
docker exec -it $(docker ps -qf "name=composer-playground") bash - Delete the existing card store:
rm -rf /home/composer/.composer/cards exit - Restart the container to generate a fresh card store:
docker restart $(docker ps -qf "name=composer-playground")
3. Validate Docker Compose Configuration
Outdated or misconfigured Docker Compose files can lead to compatibility issues:
- Bring down your current environment:
docker-compose down - Replace your
docker-compose.ymlwith the latest compatible version from the official Hyperledger Composer setup instructions. - Re-launch the environment:
docker-compose up -d
4. Update Composer Playground Image
Your Docker version (17.12.1-ce) might have compatibility gaps with older Composer images. Pull the latest stable image:
docker pull hyperledger/composer-playground:latest
Then restart the container using this updated image.
5. Check for Port or Network Conflicts
Even though the logs show Playground starts on port 8080, hidden network conflicts could be causing connectivity issues:
- Verify no other processes are using port 8080:
sudo lsof -i :8080 - If another process is using the port, stop it or modify your Docker Compose file to map to an alternate port (e.g., 8081):
services: composer-playground: ports: - "8081:8080" - Restart the environment with the updated port mapping.
If none of these steps resolve the issue, consider a full reinstall of Hyperledger Composer components, ensuring you follow the tutorial's prerequisites and steps exactly.
内容的提问来源于stack exchange,提问作者Min Joon So

