Hey!
As mentioned in a few of my other questions, I am trying to figure out installing, building and running n8n using source code to be used as a self-hosted solution in my organization. That is the only option that I have due to policies at my organization. Direct installation using any of the methods present in docs is not allowed.
Note that currently I am trying to set it up all on my personal machine but whatever steps I am doing like downloading code, installing dependencies, building etc will all go into a jenkins pipeline and the final thing would be formed into a docker image to run on our openshift clusters.
Note that my organization does not allow directly downloading anything from github or external npm repos either. So the entire n8n code and ALL its dependencies will need to be downloaded separately in a controlled environment and built and run to ensure everything works. Once that is established, the n8n code will be uploaded to internal git repo and dependent packages needed will be loaded into inhouse npm repository from where they will need to be installed during deployments using jenkins pipeline.
So there is no command that I can run manually for each individual package. I was expecting that since n8n is being used in prod environments of a lot of clients, the code on above repo would be up-to-date. I hope and think it is but I am not sure as tests are failing reporting this:
test/TelemetryHelpers.test.ts(1,72): error TS2307: Cannot find module āuuidā or its corresponding type declarations.
I understand I need to install this dependency but I cannot be installing each individual dependency like this. I have an entire document recording whatever steps I am taking and output from bash console but I donāt see any way to attach the file here. If there is a way to share the file, please let me know.
So here is what I did on my personal machine with Windows 10 Home:
-
I created a folder in f:\n8n into which I cloned the repo so the root folder is f:\n8n\n8n
-
Into f:\n8n folder, I downloaded the n8n code with git clone āGitHub - n8n-io/n8n: Free and open fair-code licensed node based Workflow Automation Tool. Easily automate tasks across different services.ā
-
I built it with ānpm run buildā but it fails saying lerna is missing
-
I installed ALL dependencies from root folder with ānpm installā
-
I build again but this time it fails saying tsc is missing from packages\workflow and gulp is missing from packages\design-system
-
I CD into respective package folders and install ALL dependencies with ānpm installā
-
I build again and this time it shows an error about uuid:
test/TelemetryHelpers.test.ts(1,72): error TS2307: Cannot find module āuuidā or its corresponding type declarations.
I was expecting that when I install dependencies as I mentioned above, it should be working fine since this file is in design-system folder for which ALL the dependencies were installed in above steps.
Below is the build command and the output of it:
$ npm run build
[email protected] build F:\n8n\n8n
lerna exec npm run build
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 7 packages: ānpm run buildā
[email protected] build F:\n8n\n8n\packages\workflow
tsc
[email protected] build F:\n8n\n8n\packages\design-system
npm run build:theme
[email protected] build:theme F:\n8n\n8n\packages\design-system
gulp build:theme
[20:39:31] Using gulpfile F:\n8n\n8n\packages\design-system\gulpfile.js
[20:39:31] Starting ābuild:themeāā¦
[20:39:31] Starting ācompileThemeāā¦
[20:39:34] Finished ācompileThemeā after 3.15 s
[20:39:34] Starting ācopyThemeFontsāā¦
[20:39:35] Finished ācopyThemeFontsā after 69 ms
[20:39:35] Finished ābuild:themeā after 3.23 s
test/TelemetryHelpers.test.ts(1,72): error TS2307: Cannot find module āuuidā or its corresponding type declarations.
I searched for uuid package/module and I could find it in following places so it should not be failing to build. So how do I fix it now?
- n8n/node_modules/request/node_modules/uuid
- n8n/node_modules/temp-write/node_modules/uuid
- n8n/packages/design-system/node_modules/uuid ā this package is where the erring file is!
- n8n/packages/design-system/node_modules/sockjs/node_modules/uuid
- n8n/packages/design-system/node_modules/node-notifier/node_modules/uuid