Failed to install web from local source #12818

Closed
opened 2026-02-21 19:09:13 -05:00 by yindo · 3 comments
Owner

Originally created by @Ryuukeisyou on GitHub (Apr 11, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.2.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

system

windows 11 pro

node and npm

node -v
v18.20.8

npm -v
8.19.4

I try to run the web locally

cd web
npm install

✔️ Expected Behavior

install web dependencies

Actual Behavior

PS D:\dev\source\repos\langgenius\dify\web> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: dify-web@1.2.0
npm ERR! Found: react@19.0.0
npm ERR! node_modules/react
npm ERR!   react@"19.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from ahooks@3.8.4
npm ERR! node_modules/ahooks
npm ERR!   ahooks@"^3.8.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

if i try npm install --legacy-peer-deps, it will get following

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@faker-js/faker@9.6.0',
npm WARN EBADENGINE   required: { npm: '>=9.0.0', node: '>=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v18.20.8', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'minimatch@10.0.1',
npm WARN EBADENGINE   required: { node: '20 || >=22' },
npm WARN EBADENGINE   current: { node: 'v18.20.8', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated npmlog@5.0.1: This package is no longer supported.
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm WARN deprecated gauge@3.0.2: This package is no longer supported.

> dify-web@1.2.0 preinstall
> npx only-allow pnpm

╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║   Use "pnpm install" for installation in this project.      ║
║                                                             ║
║   If you don't have pnpm, install it via "npm i -g pnpm".   ║
║   For more details, go to https://pnpm.js.org/              ║
║                                                             ║
╚═════════════════════════════════════════════════════════════╝
npm ERR! code 1
npm ERR! path D:\dev\source\repos\langgenius\dify\web
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c npx only-allow pnpm
Originally created by @Ryuukeisyou on GitHub (Apr 11, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.2.0 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce system ```shell windows 11 pro ``` node and npm ```shell node -v v18.20.8 npm -v 8.19.4 ``` I try to run the web locally ```shell cd web npm install ``` ### ✔️ Expected Behavior install web dependencies ### ❌ Actual Behavior ```shell PS D:\dev\source\repos\langgenius\dify\web> npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: dify-web@1.2.0 npm ERR! Found: react@19.0.0 npm ERR! node_modules/react npm ERR! react@"19.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from ahooks@3.8.4 npm ERR! node_modules/ahooks npm ERR! ahooks@"^3.8.4" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. ``` if i try ```npm install --legacy-peer-deps```, it will get following ```shell npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@faker-js/faker@9.6.0', npm WARN EBADENGINE required: { npm: '>=9.0.0', node: '>=18.0.0' }, npm WARN EBADENGINE current: { node: 'v18.20.8', npm: '8.19.4' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'minimatch@10.0.1', npm WARN EBADENGINE required: { node: '20 || >=22' }, npm WARN EBADENGINE current: { node: 'v18.20.8', npm: '8.19.4' } npm WARN EBADENGINE } npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN deprecated npmlog@5.0.1: This package is no longer supported. npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated are-we-there-yet@2.0.0: This package is no longer supported. npm WARN deprecated gauge@3.0.2: This package is no longer supported. > dify-web@1.2.0 preinstall > npx only-allow pnpm ╔═════════════════════════════════════════════════════════════╗ ║ ║ ║ Use "pnpm install" for installation in this project. ║ ║ ║ ║ If you don't have pnpm, install it via "npm i -g pnpm". ║ ║ For more details, go to https://pnpm.js.org/ ║ ║ ║ ╚═════════════════════════════════════════════════════════════╝ npm ERR! code 1 npm ERR! path D:\dev\source\repos\langgenius\dify\web npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c npx only-allow pnpm ```
yindo closed this issue 2026-02-21 19:09:13 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 11, 2025):

Hello @Ryuukeisyou! I'm Dosu, your friendly bot here to help you tackle bugs, answer questions, and guide you in becoming a contributor. I'm here to assist while you wait for a human maintainer. Let's get started! 🚀

To resolve the installation issue for dify-web@1.2.0, you need to use pnpm instead of npm as the package manager. The error message indicates that the project is configured to enforce the use of pnpm through the only-allow package.

Here are the steps to follow:

  1. Install pnpm: If you haven't already installed pnpm, you can do so by running:

    npm install -g pnpm
    
  2. Use pnpm to Install Dependencies: Navigate to the web directory and install the dependencies using pnpm:

    cd web
    pnpm install
    

By using pnpm, you should be able to resolve the dependency conflicts and proceed with the installation successfully.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 11, 2025): <!-- Greeting --> Hello @Ryuukeisyou! I'm [Dosu](https://dosu.dev), your friendly bot here to help you tackle bugs, answer questions, and guide you in becoming a contributor. I'm here to assist while you wait for a human maintainer. Let's get started! 🚀 <!-- Answer --> To resolve the installation issue for `dify-web@1.2.0`, you need to use `pnpm` instead of `npm` as the package manager. The error message indicates that the project is configured to enforce the use of `pnpm` through the `only-allow` package. Here are the steps to follow: 1. **Install pnpm**: If you haven't already installed `pnpm`, you can do so by running: ```shell npm install -g pnpm ``` 2. **Use pnpm to Install Dependencies**: Navigate to the `web` directory and install the dependencies using `pnpm`: ```shell cd web pnpm install ``` By using `pnpm`, you should be able to resolve the dependency conflicts and proceed with the installation successfully. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/28ea763c-caf0-4729-a10d-ba55f3da3bf3?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/28ea763c-caf0-4729-a10d-ba55f3da3bf3?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/28ea763c-caf0-4729-a10d-ba55f3da3bf3?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/28ea763c-caf0-4729-a10d-ba55f3da3bf3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/28ea763c-caf0-4729-a10d-ba55f3da3bf3?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/28ea763c-caf0-4729-a10d-ba55f3da3bf3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/28ea763c-caf0-4729-a10d-ba55f3da3bf3?feedback_type=other)</sup>
Author
Owner

@dona-dona-dona commented on GitHub (Apr 11, 2025):

Upon reviewing the package.json(with ver1.1.3 & ver1.2.0), I discovered that npm is disabled as a package manager. (I haven't investigated when this change occurred.)

This means that the instructions in the official manual:

https://docs.dify.ai/getting-started/install-self-hosted/local-source-code

are incorrect. Whether or not to continue supporting npm is a decision that the Dify team should make, as I cannot determine that.

With that in mind, I request that the Dify team take one of the following actions:

Add instructions for the npm case (perhaps involving forced installation?).
Revise the instructions to reflect the pnpm installation process.

@dona-dona-dona commented on GitHub (Apr 11, 2025): Upon reviewing the package.json(with ver1.1.3 & ver1.2.0), I discovered that npm is disabled as a package manager. (I haven't investigated when this change occurred.) This means that the instructions in the official manual: https://docs.dify.ai/getting-started/install-self-hosted/local-source-code are incorrect. Whether or not to continue supporting npm is a decision that the Dify team should make, as I cannot determine that. With that in mind, I request that the Dify team take one of the following actions: Add instructions for the npm case (perhaps involving forced installation?). Revise the instructions to reflect the pnpm installation process.
Author
Owner

@crazywoola commented on GitHub (Apr 12, 2025):

We do not provide technical support for starting from the source. Thank you for your understanding. We assume you have the necessary expertise to set it up independently. If you require technical support, please obtain our business license by contacting us at business@dify.ai.

https://github.com/langgenius/dify/blob/be3ebea45b0e86ed3d62a2869ecbb36b0ee1d388/web/README.md#L5-L23

Please read the README first before asking the question.

@crazywoola commented on GitHub (Apr 12, 2025): We do not provide technical support for starting from the source. Thank you for your understanding. We assume you have the necessary expertise to set it up independently. If you require technical support, please obtain our business license by contacting us at business@dify.ai. https://github.com/langgenius/dify/blob/be3ebea45b0e86ed3d62a2869ecbb36b0ee1d388/web/README.md#L5-L23 Please read the README first before asking the question.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12818