langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
46.76k stars 6.61k forks source link

docker build web project failed. error Can't add "@types/prop-types": invalid package version undefined. #8865

Closed songsh closed 15 hours ago

songsh commented 19 hours ago

Self Checks

Dify version

0.6.9

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

docker build -t langgenius/dify-web .

✔️ Expected Behavior

build success

❌ Actual Behavior

=> ERROR [packages 5/5] RUN yarn install --frozen-lockfile --registry https://registry.npmmirror.com/ 1.0s

[packages 5/5] RUN yarn install --frozen-lockfile --registry https://registry.npmmirror.com/:

14 0.813 yarn install v1.22.19

14 0.900 [1/5] Validating package.json...

14 0.904 [2/5] Resolving packages...

14 0.933 error Can't add "@types/prop-types": invalid package version undefined.

14 0.933 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


executor failed running [/bin/sh -c yarn install --frozen-lockfile --registry https://registry.npmmirror.com/]: exit code: 1

dosubot[bot] commented 19 hours ago

To resolve the error "Can't add '@types/prop-types': invalid package version undefined" when building the Docker image, you need to ensure that the @types/prop-types package is correctly specified in your package.json file. Based on the provided package.json content, the @types/prop-types package is not listed in the dependencies or devDependencies.

You can add the @types/prop-types package with a valid version to the devDependencies section of your package.json file. Here is how you can do it:

{
  "devDependencies": {
    "@types/prop-types": "^15.7.5",
    // ... other devDependencies
  }
}

After adding the package, try building the Docker image again using the command:

docker build -t langgenius/dify-web .

This should resolve the error related to the invalid package version [1].

To continue talking to Dosu, mention @dosu.