Windows Compatibility Issue: 'cp' command not found when running pnpm start #17366

Closed
opened 2026-02-21 19:34:32 -05:00 by yindo · 0 comments
Owner

Originally created by @gin-melodic on GitHub (Sep 14, 2025).

Originally assigned to: @gin-melodic on GitHub.

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

dify-web@1.8.1 start .\dify\web > cp -r .next/static .next/standalone/.next/static && cp -r public .next/standalone/public && cross-env PORT=$npm_config_port HOSTNAME=$npm_config_host node .next/standalone/server.js 'cp' is not recognized as an internal or external command, operable program or batch file.  ELIFECYCLE  Command failed with exit code 1.

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Bug Description

When attempting to start the Dify web application on Windows using pnpm start, the command fails with the error "'cp' is not recognized as an internal or external command, operable program or batch file." This is because the cp command used in the start script is a Unix/Linux command that doesn't exist natively on Windows.

Steps to Reproduce

  1. Clone the Dify repository on a Windows machine
  2. Navigate to the web directory
  3. Run pnpm install to install dependencies
  4. Run pnpm build to build the application
  5. Run pnpm start to start the application
  6. Observe the error

✔️ Expected Behavior

The application should start successfully on Windows, just like it does on Unix-like systems.

Actual Behavior

The command fails with the error:

'cp' is not recognized as an internal or external command, operable program or batch file.
Originally created by @gin-melodic on GitHub (Sep 14, 2025). Originally assigned to: @gin-melodic on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version > dify-web@1.8.1 start .\dify\web > cp -r .next/static .next/standalone/.next/static && cp -r public .next/standalone/public && cross-env PORT=$npm_config_port HOSTNAME=$npm_config_host node .next/standalone/server.js 'cp' is not recognized as an internal or external command, operable program or batch file.  ELIFECYCLE  Command failed with exit code 1. ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce ## Bug Description When attempting to start the Dify web application on Windows using `pnpm start`, the command fails with the error "'cp' is not recognized as an internal or external command, operable program or batch file." This is because the `cp` command used in the start script is a Unix/Linux command that doesn't exist natively on Windows. ## Steps to Reproduce 1. Clone the Dify repository on a Windows machine 2. Navigate to the `web` directory 3. Run `pnpm install` to install dependencies 4. Run `pnpm build` to build the application 5. Run `pnpm start` to start the application 6. Observe the error ### ✔️ Expected Behavior The application should start successfully on Windows, just like it does on Unix-like systems. ### ❌ Actual Behavior The command fails with the error: ``` 'cp' is not recognized as an internal or external command, operable program or batch file. ```
yindo added the 🐞 bugstale labels 2026-02-21 19:34:32 -05:00
yindo closed this issue 2026-02-21 19:34:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#17366