n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
48.31k stars 7.5k forks source link

Please make build work on Windows (specifically n8n/packages/@n8n/chat) #11550

Open David-Hari opened 1 day ago

David-Hari commented 1 day ago

Bug Description

When I run pnpm build on Windows, it fails here:

@n8n/chat:build: > @n8n/chat@0.29.0 build:bundle C:\dev\n8n\packages\@n8n\chat
@n8n/chat:build: > INCLUDE_VUE=true vite build
@n8n/chat:build:
@n8n/chat:build: 'INCLUDE_VUE' is not recognized as an internal or external command,
@n8n/chat:build: operable program or batch file.
@n8n/chat:build: ELIFECYCLE Command failed with exit code 1.
@n8n/chat:build: ELIFECYCLE Command failed with exit code 1.
@n8n/chat:build: ERROR: command finished with error: command (C:\dev\n8n\packages\@n8n\chat) C:\Program Files\NodeJS\pnpm.CMD run build exited (1)
@n8n/chat#build: command (C:\dev\n8n\packages\@n8n\chat) C:\Program Files\NodeJS\pnpm.CMD run build exited (1)

If I edit the package.json file in n8n/packages/@n8n/chat and change the "build:bundle" line to: set INCLUDE_VUE=true vite build then it works fine.

There should be some OS-independent way to set this variable.

To Reproduce

  1. Use Windows
  2. Check out code and pnpm install
  3. Run pnpm build

Expected behavior

Should build successfully

Operating System

Windows 10

n8n Version

1.65.0

Node.js Version

v18.20.0

Database

SQLite (default)

Execution mode

main (default)

Joffcom commented 1 day ago

Hey @David-Hari,

We have created an internal ticket to look into this which we will be tracking as "GHC-393"

David-Hari commented 1 day ago

Wow that was quick! Yes I just noticed https://github.com/n8n-io/n8n/pull/10676. Thanks.

netroy commented 2 hours ago

Does the build work on WSL for you?

Having to keep the build tooling up to date on regular windows is quite a chore for us, and since only contributors should be building the app from source, we'd really like to stop supporting windows dev environments not using WSL to reduce the maintenance effort for us.