Issue on dist files when building

Hi! I was trying to create a dev environment in Windows 10 in order to add a feature to an existing node.

I followed the instructions in the contributing section.

My first issue was that, when trying to run the “npm run start” command (after building with “npm run build”), it would give the error:

Error: There was an error: ENOENT: no such file or directory, open 'C:\Users\Username\Desktop\WORKSPACE\Dev_n8n\n8n\packages\cli\dist\src\PublicApi\v1\openapi.yml'

So I guessed this openapi.yml missing file would be the same that is in the src folder, so I copy pasted the filed in the corresponding folder and then I could npm run start properly.

The next issue I had was that, the npm run start command would apparently work properly, but when opening the corresponding window in the browser, a blank page would show. Opening the network tab I saw that some calls to js and css files that did not reach a response due to wrong path, apparently.

I opened the index.html file that is used in dist (n8n\packages\editor-ui\dist\index.html) and I saw that the routes to this js and css files were written with // instead of just /

I replaced this double slashes with just one, and then it apparently works well.

My problem is that I have to do these two steps everytime I want to build the code, and is quite annoying.
I am aware of the npm run dev command, but when I tried to use it, my PC became so slow, so I thought that I would just build whenever I did some change. But this method did not give any of the previous issues (I assume because dev mode uses src files and not dist files).

I am assuming maybe I did something wrong when building the environment, or I am missing some configuration step for building; but I just followed the instructions previously quoted, and I created the environment twice just to make sure I did not skip any step, but I had the same issues on both environments.

Also, I am quite sure this problem is just related to the creation of the dist files, since running n8n in dev mode or with the --tunnel flag seems to not give any of these issues (I am guessing these 2 methods use src files and not dist files).

Anyone can tell me if I am missing something (most probably) or this is actually an error that anyone else than me is having currently?

Information on your n8n setup

  • n8n version: 0.193.5
  • Database you’re using: SQLite
  • Running n8n with the execution process npm run start
  • Running n8n via npm

Hey @CCA-IK ,
welcome to the community :tada:

I am sorry to hear you are having problems. I just tried building n8n on Windows 10 myself and it looks like something broke along the latest commits. I am getting different error messages than you though. I created a internal ticket and we started to investigate. I’ll keep you updated.