codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
28.58k stars 2.08k forks source link

`yarn install` fails with error: "Couldn't find any versions for `@editorjs/helpers` that matches `workspace:*`" in Docker container #2816

Closed kirchik95 closed 2 months ago

kirchik95 commented 2 months ago

Hi there,

I'm encountering an issue while trying to build my project that uses editor.js inside a Docker container. The yarn install command fails with the following error:

error Couldn't find any versions for "@editorjs/helpers" that matches "workspace:*"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

However, I don't use @editorjs/helpers anywhere in my project, nor do I use Yarn Workspaces. I've verified that this package is not listed in my package.json. Despite this, the build process fails during dependency installation inside the Docker container.

I've tried the following to resolve the issue:

  1. Deleted node_modules and yarn.lock and ran yarn install again.
  2. Cleared the Yarn cache using yarn cache clean.
  3. Ensured that all dependencies in package.json are correct.

Unfortunately, none of these steps have resolved the issue. The error consistently points to a missing version for @editorjs/helpers with workspace:*.

This issue occurs specifically when running the build inside a Docker container.

For reference, I will attach my package.json and Dockerfile to help diagnose the issue.

Expected Behavior: Yarn should install all dependencies without errors, as @editorjs/helpers is not explicitly required in my project.

Environment:

Thank you for looking into this!


Dockerfile:

FROM node:18.12.0-alpine as deps
WORKDIR /app
COPY package.json ./

RUN npm i -g cross-env webpack-cli && \
apk add --no-cache build-base g++ cairo-dev jpeg-dev pango-dev giflib-dev  && \
apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing libmount ttf-dejavu ttf-droid ttf-freefont ttf-liberation fontconfig

RUN yarn install --cache-folder /tmp/yarn \
    && rm -rf /tmp/*

FROM deps as build
ARG PROJECT
ENV NODE_ENV=production \
    PROJECT=$PROJECT
COPY . .
RUN yarn build

FROM nginx:1.24-alpine
WORKDIR /app
COPY --from=build /app/dist/ /app/public/
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/htpasswd /etc/nginx/htpasswd
COPY nginx/s3_presign_scorm_url.conf /etc/nginx/s3_presign_scorm_url.conf
COPY nginx/*  /etc/nginx/conf.d/

RUN ln -s ../data/system public/system \
    && ln -s ../data/scorms public/scorms \
    && mkdir data && chown nobody:nobody data \
    && chmod +x /etc/nginx/conf.d/upstream-create.sh \
    && mv /etc/nginx/conf.d/prepare.sh /docker-entrypoint.d/60-prepare.sh \
    && mv /etc/nginx/conf.d/upstream-create.sh /docker-entrypoint.d/50-upstream-create.sh \
    && apk add bash

HEALTHCHECK --interval=30s --timeout=5s --start-period=5s CMD \
    curl -s 127.0.0.1/nginx_status | grep -q Active

CMD ["nginx", "-g", "daemon off;"]

package.json:

{
  "name": "app-name",
  "version": "1.0.0",
  "description": "",
  "main": "index.tsx",
  "scripts": {
    "start": "cross-env NODE_ENV=development webpack-dev-server",
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@ckeditor/ckeditor5-build-classic": "^36.0.1",
    "@ckeditor/ckeditor5-build-decoupled-document": "^37.1.0",
    "@ckeditor/ckeditor5-image": "^37.1.0",
    "@ckeditor/ckeditor5-react": "^6.0.0",
    "@ckeditor/ckeditor5-upload": "^37.1.0",
    "@codemirror/lang-go": "^6.0.1",
    "@codemirror/lang-javascript": "^6.2.2",
    "@editorjs/checklist": "^1.2.0",
    "@editorjs/code": "^2.6.0",
    "@editorjs/delimiter": "^1.2.0",
    "@editorjs/editorjs": "^2.19.0",
    "@editorjs/embed": "^2.4.0",
    "@editorjs/header": "^2.6.0",
    "@editorjs/image": "^2.6.0",
    "@editorjs/inline-code": "^1.3.1",
    "@editorjs/link": "^2.3.1",
    "@editorjs/list": "^1.6.0",
    "@editorjs/marker": "^1.2.2",
    "@editorjs/paragraph": "^2.8.0",
    "@editorjs/quote": "^2.4.0",
    "@editorjs/raw": "^2.2.0",
    "@editorjs/simple-image": "^1.4.0",
    "@editorjs/table": "^1.3.0",
    "@editorjs/warning": "^1.2.0",
    "@popperjs/core": "^2.11.6",
    "@rails/actioncable": "^7.0.6",
    "@reduxjs/toolkit": "^1.9.5",
    "@sentry/react": "^6.17.9",
    "@sentry/tracing": "^6.17.9",
    "@types/actioncable": "^5.2.7",
    "@types/rails__actioncable": "^6.1.6",
    "@types/react-scroll-sync": "^0.8.4",
    "@types/react-virtualized-auto-sizer": "^1.0.3",
    "@types/react-window": "^1.8.8",
    "@types/react-window-infinite-loader": "^1.0.9",
    "actioncable": "5.2.8-1",
    "arr-union": "3.1.0",
    "axios": "0.19.0",
    "body-scroll-lock": "^3.0.3",
    "camelcase-keys": "^6.2.2",
    "chart.js": "3.8.2",
    "classnames": "2.2.6",
    "clone-deep": "4.0.1",
    "codemirror": "^6.0.1",
    "connected-react-router": "6.6.1",
    "core-js": "3.26.1",
    "d3-selection": "^2.0.0",
    "d3-shape": "^2.0.0",
    "debounce-promise": "^3.1.2",
    "dotenv": "8.2.0",
    "editorjs-paragraph-with-alignment": "3.x",
    "emoji-picker-react": "^4.9.4",
    "file-saver": "2.0.2",
    "framer-motion": "7.0.0",
    "history": "4.10.1",
    "html-react-parser": "^5.1.10",
    "html-to-image": "^1.7.0",
    "js-confetti": "^0.12.0",
    "kind-of": "6.0.3",
    "lodash.difference": "4.5.0",
    "lodash.isequal": "4.5.0",
    "mime-types": "2.1.26",
    "mixin-deep": "2.0.1",
    "moment": "^2.30.1",
    "moment-duration-format": "^2.3.2",
    "normalize.css": "8.0.1",
    "nouislider-react": "^3.3.8",
    "prettysize": "^2.0.0",
    "pure-react-carousel": "1.25.2",
    "qs": "6.9.1",
    "rc-swipeout": "^2.0.11",
    "react": "16.14.0",
    "react-beautiful-dnd": "^13.0.0",
    "react-chartjs-2": "2.9.0",
    "react-color": "^2.19.3",
    "react-dates": "21.8.0",
    "react-device-detect": "1.12.1",
    "react-dom": "16.14.0",
    "react-editor-js": "^1.6.2",
    "react-error-boundary": "^4.0.13",
    "react-ga4": "^2.1.0",
    "react-helmet": "^6.0.0",
    "react-id-swiper": "^4.0.0",
    "react-inlinesvg": "^3.0.2",
    "react-minimal-datetime-range": "^1.6.0",
    "react-pdf": "7.7.0",
    "react-player": "^2.6.2",
    "react-popper": "^2.3.0",
    "react-redux": "7.1.3",
    "react-router-dom": "5.1.2",
    "react-scroll-sync": "^0.11.0",
    "react-select": "^5.4.0",
    "react-sortable-hoc": "1.11.0",
    "react-sticky-box": "1.0.2",
    "react-text-mask": "^5.4.3",
    "react-textarea-autosize": "^7.1.2",
    "react-transition-group": "^4.4.1",
    "react-use": "^17.4.0",
    "react-virtualized-auto-sizer": "^1.0.20",
    "react-webcam": "^5.2.1",
    "react-window": "^1.8.10",
    "react-window-infinite-loader": "^1.0.9",
    "reactour": "^1.18.0",
    "redux": "4.0.5",
    "redux-thunk": "2.3.0",
    "reselect": "4.0.0",
    "snakecase-keys": "^3.2.0",
    "styled-components": "4.0.0",
    "swiper": "^5.4.5",
    "thememirror": "^2.0.1",
    "to-snake-case": "^1.0.0",
    "video-react": "0.14.1"
  },
  "devDependencies": {
    "@ianvs/prettier-plugin-sort-imports": "^3.7.2",
    "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
    "@svgr/webpack": "^5.5.0",
    "@swc/core": "1.3.22",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "11.x.x",
    "@testing-library/user-event": "^14.4.3",
    "@types/body-scroll-lock": "^3.1.0",
    "@types/classnames": "2.2.9",
    "@types/debounce-promise": "^3.1.5",
    "@types/file-saver": "2.0.1",
    "@types/jest": "^29.5.3",
    "@types/jsdom": "^21.1.1",
    "@types/lodash.difference": "4.5.6",
    "@types/lodash.isequal": "4.5.5",
    "@types/mime-types": "2.1.0",
    "@types/node-fetch": "2.5.4",
    "@types/qs": "6.9.0",
    "@types/react": "16.9.17",
    "@types/react-beautiful-dnd": "^13.1.2",
    "@types/react-color": "^3.0.6",
    "@types/react-dates": "17.1.10",
    "@types/react-dom": "16.9.4",
    "@types/react-helmet": "^6.1.5",
    "@types/react-pdf": "4.0.3",
    "@types/react-redux": "7.1.5",
    "@types/react-router-dom": "5.1.3",
    "@types/react-select": "^5.0.1",
    "@types/react-text-mask": "^5.4.7",
    "@types/react-textarea-autosize": "^8.0.0",
    "@types/react-transition-group": "^4.4.5",
    "@types/reactour": "^1.18.2",
    "@types/regenerator-runtime": "^0.13.1",
    "@types/swiper": "^6.0.0",
    "@types/to-snake-case": "^1.0.0",
    "@types/uuid": "^9.0.4",
    "@typescript-eslint/eslint-plugin": "5.22.0",
    "@typescript-eslint/parser": "5.22.0",
    "axios-mock-adapter": "1.17.0",
    "clean-webpack-plugin": "^4.0.0",
    "connect-history-api-fallback": "1.6.0",
    "copy-webpack-plugin": "^11.0.0",
    "cross-env": "7.0.0",
    "css-loader": "6.7.1",
    "directory-named-webpack-plugin": "4.0.1",
    "editorjs-text-color-plugin": "^1.1.22",
    "esbuild-loader": "2.20.0",
    "eslint": "8.37.0",
    "eslint-config-prettier": "8.5.0",
    "eslint-import-resolver-typescript": "^2.7.1",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-prettier": "4.2.1",
    "eslint-plugin-react": "7.29.4",
    "eslint-webpack-plugin": "^3.1.1",
    "file-loader": "^6.2.0",
    "fork-ts-checker-webpack-plugin": "7.2.11",
    "html-replace-webpack-plugin": "^2.6.0",
    "html-string-replace-webpack-plugin-webpack-4": "1.0.8",
    "html-webpack-plugin": "^5.3.1",
    "husky": "3.1.0",
    "identity-obj-proxy": "^3.0.0",
    "jest": "^29.6.1",
    "jest-environment-jsdom": "^29.6.1",
    "lint-staged": "9.5.0",
    "merge-deep": "3.0.2",
    "mini-css-extract-plugin": "^2.6.0",
    "path-browserify": "^1.0.1",
    "postcss": "^8.4.12",
    "postcss-html": "^0.36.0",
    "postcss-loader": "^5.3.0",
    "postcss-scss": "^4.0.3",
    "prettier": "2.8.7",
    "progress-bar-webpack-plugin": "^2.1.0",
    "react-refresh": "^0.13.0",
    "react-test-renderer": "^18.2.0",
    "regenerator-runtime": "^0.13.11",
    "sass": "1.56.2",
    "sass-loader": "13.2.0",
    "sass-resources-loader": "2.2.5",
    "size-limit": "2.2.4",
    "speed-measure-webpack-plugin": "^1.5.0",
    "style-loader": "3.3.1",
    "stylelint": "^14.6.1",
    "stylelint-config-prettier": "9.0.5",
    "stylelint-config-recommended": "7.0.0",
    "stylelint-order": "5.0.0",
    "stylelint-scss": "4.2.0",
    "stylelint-webpack-plugin": "3.2.0",
    "swc-loader": "0.2.3",
    "terser-webpack-plugin": "^5.3.0",
    "ts-jest": "^29.1.1",
    "typescript": "4.6.4",
    "url": "^0.11.0",
    "url-loader": "^4.1.1",
    "webpack": "5.75.0",
    "webpack-bundle-analyzer": "^4.4.2",
    "webpack-cli": "5.0.1",
    "webpack-dev-server": "4.11.1",
    "webpack-merge": "4.2.2",
    "workbox-webpack-plugin": "^6.1.5"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
amirping commented 2 months ago

having the same issue since yesterday with docker node:alpine3.19 and with node:22.6-bookworm I don't use workspace.

neSpecc commented 2 months ago

Try updating @editorjs/quote to the latest version