# Multi-stage build to compile the monorepo and serve the UI with a lightweight nginx
FROM node:16-bullseye-slim AS builder
WORKDIR /app
# Install system dependencies required for building native modules
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
build-essential \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install pnpm (compatible with the repo's scripts)
RUN npm i -g pnpm@8
# Copy package manager files first to leverage caching
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
RUN pnpm install
# Copy the rest of the repository
COPY . .
# Build the project (root package.json defines the build script that handles the workspace)
RUN pnpm run build
# Production: serve built assets with nginx
FROM nginx:1.23-alpine AS prod
# Copy the built UI assets from the builder stage
COPY --from=builder /app/packages/ctool-core/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
# Ignore common files and folders for Docker context .git/ node_modules/ **/node_modules/ dist/ build/ coverage/ .vscode/ *.log *.tmp .env .env.local .env.* .DS_Store pnpm-debug.log*
Failing step - Failing command/step: [builder 6/8] RUN pnpm install - Exit code: 1 (process "/bin/sh -c pnpm install" did not complete successfully: exit code: 1) Exact error messages to preserve - WARN Ignoring broken lockfile at /app: Lockfile /app/pnpm-lock.yaml not compatible with current pnpm - ERR_PNPM_WORKSPACE_PKG_NOT_FOUND In : "ctool-config@workspace:*" is in the dependencies but no package named "ctool-config" is present in the workspace - This error happened while installing a direct dependency of /app - Packages found in the workspace: ctool Missing packages or files mentioned - ctool-config package is referenced in the workspace dependencies but is not present in the workspace Version/mismatch information - Lockfile mismatch: “Lockfile /app/pnpm-lock.yaml not compatible with current pnpm” indicates a pnpm version/lockfile compatibility issue - The step previously runs pnpm install after installing pnpm@8, suggesting a version mismatch between the lockfile and the current pnpm version could be contributing to the error Context notes - Dockerfile step: RUN pnpm install - The workspace contains a package named ctool, but not ctool-config, which triggers the workspace package not found error during dependency installation
packages:
- 'packages/**'
catalog:
'@types/lodash': ^4.17.7
'@types/node': ^22.0.0
'@vitejs/plugin-vue': ^5.1.0
'@vueuse/core': ^11.0.0
lodash: ^4.17.21
typescript: ^5.5.0
vite: ^5.4.3
tsup: ^8.2.4
axios: ^1.7.0
vue-tsc: ^2.1.0
vue: ^3.5.0
vue-router: ^4.4.0
'@vue/runtime-core': ^3.5.0
dayjs: ^1.11.12
{
"name": "ctool",
"version": "2.4.0",
"type": "module",
"description": "程序开发常用工具 chrome / edge / firefox / utools / windows / linux / mac",
"homepage": "https://ctool.dev",
"repository": "https://github.com/baiy/Ctool",
"author": "baiy",
"license": "MIT",
"scripts": {
"initialize": "pnpm --filter ctool-config run build && pnpm --filter ctool-adapter-base run build && pnpm -r run adapter-build",
"check": "pnpm run initialize && pnpm --filter ctool-core run check",
"dev": "pnpm run initialize && pnpm --filter ctool-core run dev",
"build": "pnpm run initialize && pnpm --filter ctool-core run build",
"release": "node release.cjs && pnpm run build && pnpm -r run platform-release",
"only-release": "node release.cjs && pnpm -r run platform-release",
"vercel-build": "pnpm run build && pnpm --filter ctool-site run build",
"clear": "node clear.cjs"
},
"devDependencies": {
"@types/http-proxy": "^1.17.10",
"@types/node": "catalog:",
"@vercel/node": "^2.9.12",
"typescript": "catalog:"
},
"dependencies": {
"ctool-config": "workspace:*",
"http-proxy": "^1.18.1"
}
}
# Multi-stage build to compile the monorepo and serve the UI with a lightweight nginx
FROM node:16-bullseye-slim AS builder
WORKDIR /app
# Install system dependencies required for building native modules
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
build-essential \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install pnpm (compatible with the repo's scripts). Use a pnpm version compatible with the lockfile
RUN npm i -g pnpm@7
# Copy package manager files first to leverage caching
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
RUN pnpm install
# Copy the rest of the repository
COPY . .
# Build the project (root package.json defines the build script that handles the workspace)
RUN pnpm run build
# Production: serve built assets with nginx
FROM nginx:1.23-alpine AS prod
# Copy the built UI assets from the builder stage
COPY --from=builder /app/packages/ctool-core/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
- Exact error message and exit code: "ERROR: failed to build: failed to solve: process \"/bin/sh -c pnpm install\" did not complete successfully: exit code: 1" - Failing command/step: [builder 6/8] RUN pnpm install Dockerfile: line 20 - Missing packages or files mentioned: - ERR_PNPM_WORKSPACE_PKG_NOT_FOUND: In : "ctool-config@workspace:*" is in the dependencies but no package named "ctool-config" is present in the workspace - This error occurred while installing a direct dependency of /app - Lockfile issue: WARN Ignoring broken lockfile at /app: Lockfile /app/pnpm-lock.yaml not compatible with current pnpm - Version mismatch info: - WARN Ignoring broken lockfile ... not compatible with current pnpm (pnpm lockfile compatibility issue) - New major version of npm available! 8.19.4 -> 11.12.0
# Multi-stage build to compile the monorepo and serve the UI with a lightweight nginx
FROM node:16-bullseye-slim AS builder
WORKDIR /app
# Install system dependencies required for building native modules
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
build-essential \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install pnpm (compatible with the repo's scripts). Use a pnpm version compatible with the lockfile
RUN npm i -g pnpm@8
# Copy the entire repository and install dependencies
COPY . .
RUN pnpm install
# Build the project (root package.json defines the build script that handles the workspace)
RUN pnpm run build
# Production: serve built assets with nginx
FROM nginx:1.23-alpine AS prod
# Copy the built UI assets from the builder stage
COPY --from=builder /app/packages/ctool-core/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
- Exact error message and exit code - ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER @types/node@catalog: isn't supported by any available resolver. - This error happened while installing a direct dependency of /app - EXIT CODE: 1 - Failing command/step - [builder 6/7] RUN pnpm install (Dockerfile: line 20) - Missing packages or files mentioned - Lockfile /app/pnpm-lock.yaml not compatible with current pnpm - The failure centers on @types/node@catalog not being resolvable by the available resolver - Version mismatch information - Using pnpm@8 (globally installed via RUN npm i -g pnpm@8) - Base images: node:16-bullseye-slim (from BUILD stage) and nginx:1.23-alpine (final stage) - PNPM lockfile incompatibility noted, indicating a mismatch between the lockfile version and the current pnpm resolver.
{
"name": "ctool-config",
"main": "./dist/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "pnpm exec tsup-node && node dist/generate.js"
},
"dependencies": {
"json5": "^2.2.3",
"lodash": "catalog:",
"pinyin-pro": "^3.13.0",
"svg-path-bounds": "^1.0.2"
},
"devDependencies": {
"@types/lodash": "catalog:",
"@types/node": "catalog:",
"tsup": "catalog:",
"typescript": "catalog:"
}
}
Summary (under 1500 chars) Project: ctool-core (private: true) Scripts - check: vue-tsc -b - dev: pnpm run check && vite --host - build: pnpm run check && vite build - preview: vite preview Notable dependencies (selected; see package.json for full list) - @ltd/j-toml: ^1.38.0 - @monaco-editor/loader: ^1.4.0 - @prettier/plugin-php: ^0.22.0 - @readme/httpsnippet: ^7.1.2 - @types/yargs-parser: ^21.0.0 - axios: ^1.5.0 - bcryptjs: ^2.4.3 - bignumber.js: ^9.1.1 - colord: ^2.9.3 - composerize-ts: ^0.6.2 - csv-parse: ^5.3.3 - csv-stringify: ^6.2.3 - ctool-adapter-chrome: "workspace:*" - ctool-adapter-edge: "workspace:*" - ctool-adapter-firefox: "workspace:*" - ctool-adapter-tauri: "workspace:*" - ctool-adapter-utools: "workspace:*" - ctool-config: "workspace:*" - dayjs: "catalog:" - ext-list: ^4.0.0 - html-minifier-terser: ^7.2.0 - monaco-editor: ^0.51.0 - pako: ^2.1.0 - pinia: ^2.0.29 - prettier: ^3.3.0 - prettier-plugin-java: 2.6.4 - qrcode-parser: ^2.0.4 - qs: ^6.11.0 - quicktype-core: ^23.0.0 - sql-formatter: ^15.4.2 - store2: ^2.14.2 - vue: catalog: - vue-draggable-next: ^2.1.1 - vue-router: catalog: - x2js: github:abdolence/x2js - xml-formatter: ^3.6.0 - yargs-parser: ^21.1.1 Dev dependencies (highlights) - @types/node: catalog: - typescript: catalog: - vite: catalog: - @vitejs/plugin-vue: catalog: - @vue-macros/reactivity-transform: ^1.0.0 - vite-plugin-html-config: ^2.0.2 - vite-plugin-node-polyfills: ^0.22.0 - vue-tsc: catalog: Notes - Several packages use workspace:* (ctool-adapter-*, ctool-config) - Some core libs reference catalog: placeholders (e.g., dayjs, vue, vue-router) - External sources include GitHub (x2js) and catalog-based entries.
FROM node:16-bullseye-slim AS builder
WORKDIR /app
# Install dependencies needed for building native addons
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
build-essential \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Use a PNPM version compatible with the repository's lockfile
RUN npm i -g pnpm@7
# Copy lockfiles and manifests first to leverage Docker cache
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
# Copy the repository contents
COPY . .
# Install dependencies and build the project
RUN pnpm install
RUN pnpm run build
# Production: serve built assets with nginx
FROM nginx:1.23-alpine AS prod
# Copy the built UI assets from the builder stage
COPY --from=builder /app/packages/ctool-core/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
- Failing step: [builder 7/8] RUN pnpm install (in /app)
- Exact error message and exit code:
- The process failed: "process \"/bin/sh -c pnpm install\" did not complete successfully: exit code: 1"
- Logs excerpt:
- Scope: all 11 workspace projects
- WARN Ignoring broken lockfile at /app: Lockfile /app/pnpm-lock.yaml not compatible with current pnpm
- /app/packages/ctool-adapter/base:
- ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER @types/node@catalog: isn't supported by any available resolver.
- This error happened while installing a direct dependency of /app/packages/ctool-adapter/base
- Missing packages or files mentioned:
- No explicit missing files listed; the failure is due to lockfile incompatibility and an unresolved spec for @types/node
- Version mismatch info:
- The log states the lockfile /app/pnpm-lock.yaml is not compatible with the current pnpm, implying a pnpm version/lockfile format mismatch. The ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER for @types/node also indicates resolver/spec incompatibility.FROM node:16-bullseye-slim AS builder
WORKDIR /app
# Install dependencies needed for building native addons
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
build-essential \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Use a PNPM version compatible with the repository's lockfile
RUN npm i -g pnpm@8
# Copy lockfiles and manifests first to leverage Docker cache
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
# Copy the repository contents
COPY . .
# Install dependencies for the core package only to avoid workspace-wide install pitfalls
RUN pnpm install --filter ctool-core
# Build the core package
RUN pnpm --filter ctool-core run build
# Production: serve built assets with nginx
FROM nginx:1.23-alpine AS prod
# Copy the built UI assets from the builder stage
COPY --from=builder /app/packages/ctool-core/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
- Failing step: [builder 7/8] RUN pnpm install --filter ctool-core - Exact error message and exit code: - " ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER @types/lodash@catalog: isn't supported by any available resolver." - process "/bin/sh -c pnpm install --filter ctool-core" did not complete successfully: exit code: 1 - Missing packages/files / context: - Lockfile not compatible: "Lockfile /app/pnpm-lock.yaml not compatible with current pnpm" - The error occurred while installing a direct dependency of /app/packages/ctool-core (due to the @types/lodash resolution issue) - Version/mismatch information: - pnpm lockfile incompatibility with the current pnpm version (as indicated by the warning about the broken lockfile) - The failure stems from an incompatibility in package spec resolution: "@types/lodash@catalog" isn’t supported by any available resolver - Additional context: - This happened during building the core package in the multi-stage Dockerfile, specifically at the pnpm install step for ctool-core.
FROM node:18-bullseye-slim AS builder
WORKDIR /app
# Install dependencies needed for building native addons
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
build-essential \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Use a PNPM version compatible with the repository's lockfile
RUN npm i -g pnpm@9
# Copy lockfiles and manifests first to leverage Docker cache
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
# Copy the repository contents
COPY . .
# Install dependencies for the core package and build the project
RUN pnpm install
RUN pnpm run build
# Production: serve built assets with nginx
FROM nginx:1.23-alpine AS prod
# Copy the built UI assets from the builder stage
COPY --from=builder /app/packages/ctool-core/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Concerns: Build output path /app/packages/ctool-core/dist must exist for the COPY to succeed; if the build script outputs to a different directory, the final image will fail to include the assets., No explicit .dockerignore is shown; large contexts can slow builds. Smoke [PASS]: test -f /usr/share/nginx/html/index.html Smoke [PASS]: ls -la /usr/share/nginx/html | head -n 5 Smoke [PASS]: nginx -t