Code Monkey home page Code Monkey logo

Comments (10)

janober avatar janober commented on August 26, 2024

Hello!

Thanks a lot for creating an issue about that! And you are 100% right. It is currently more than light. Actually is the documentation one of the main reasons I did not launch n8n anywhere officially yet. Hope to imporove on that a lot till the end of this month when I want to launch it on some networks.

Will look tonight into your issue and get then back to you!

from n8n.

janober avatar janober commented on August 26, 2024

Hello!

I checked now. There was a problem with the build because inquirer. Somehow was not added as dependency at all (right now no idea when it got lost and why the docker builds still worked fine). Anyway that did not even cause the problem, it was actually that they apparently renamed a type and therefor it did not build anymore. After I fixed that issues and followed the instructions everything worked fine for me. I am however on Ubuntu and you seem to work on Windows, so maybe something goes wrong there.

Btw. lerna does not has to be installed for the instructions to work. I extra used npx instead of npm in step 3 so that even if lerna is not installed it will simply get it. Also mention that again in step 5 where I wrote two different commands. There the user can choose one depending on if he has lerna installed or not.
No matter what, should probably simplify that.

Will now check in Windows and then get back to you.

from n8n.

janober avatar janober commented on August 26, 2024

"Sadly" no luck. It also worked without a problem on Windows for me. I however now "fixed" the tsconfig.json files. Even though it did not cause any issues for me, it is apparently an issue for other people like you. So is a now brainer...

However, the error message you get and the fact that for you the tsconfig.json files made problems, even though it does not for me, makes me believe that the problem is TypeScript related. Do you maybe have an old global version installed which messes the n8n build up?

from n8n.

thomasleveil avatar thomasleveil commented on August 26, 2024

I'm at home now, on Linux Mint, did:

  1. clone from 86e1c4a
  2. npm install
  3. npx lerna bootstrap --hoist
  4. npx lerna exec npm run build

and the build went fine.


However, I can reproduce my previous issue if I do:

git clone https://github.com/n8n-io/n8n.git && cd n8n
git checkout 131823a14d061c7258d2a6d1c23ed62eef0e45cd
npm i
npx lerna bootstrap --hoist
npx lerna exec npm run build
Error:

 ~/workspace/contributing/n8n  ➦ 131823a  npx lerna exec npm run build
lerna notice cli v3.16.4
lerna info versioning independent
lerna info Executing command in 6 packages: "npm run build"

> [email protected] build /home/thomas/workspace/contributing/n8n/packages/node-dev
> tsc


> [email protected] build /home/thomas/workspace/contributing/n8n/packages/workflow
> tsc

commands/new.ts:26:34 - error TS2694: Namespace 'inquirer' has no exported member 'Questions'.

26  			const typeQuestion: inquirer.Questions = {
    			                             ~~~~~~~~~

commands/new.ts:45:9 - error TS2571: Object is of type 'unknown'.

45  			if (typeAnswers.type === 'Node') {
    			    ~~~~~~~~~~~

commands/new.ts:50:39 - error TS2694: Namespace 'inquirer' has no exported member 'Questions'.

50  				const nodeTypeQuestion: inquirer.Questions = {
    				                                 ~~~~~~~~~

commands/new.ts:67:10 - error TS2571: Object is of type 'unknown'.

67  				if (nodeTypeAnswers.nodeType === 'Trigger') {
    				    ~~~~~~~~~~~~~~~

commands/new.ts:70:17 - error TS2571: Object is of type 'unknown'.

70  				} else if (nodeTypeAnswers.nodeType === 'Webhook') {
    				           ~~~~~~~~~~~~~~~

commands/new.ts:102:85 - error TS2694: Namespace 'inquirer' has no exported member 'Questions'.

102  			const additionalAnswers = await inquirer.prompt(additionalQuestions as inquirer.Questions);
     			                                                                                ~~~~~~~~~

commands/new.ts:104:22 - error TS2571: Object is of type 'unknown'.

104  			const nodeName = additionalAnswers.name;
     			                 ~~~~~~~~~~~~~~~~~

commands/new.ts:108:91 - error TS2571: Object is of type 'unknown'.

108  			const destinationFilePath = join(process.cwd(), `${changeCase.pascalCase(nodeName)}.${typeAnswers.type.toLowerCase()}.ts`);
     			                                                                                      ~~~~~~~~~~~

commands/new.ts:118:40 - error TS2694: Namespace 'inquirer' has no exported member 'Questions'.

118  				const overwriteQuestion: inquirer.Questions = [
     				                                  ~~~~~~~~~

commands/new.ts:129:10 - error TS2571: Object is of type 'unknown'.

129  				if (overwriteAnswers.overwrite === false) {
     				    ~~~~~~~~~~~~~~~~

commands/new.ts:143:30 - error TS2571: Object is of type 'unknown'.

143  				NodeDescriptionReplace: additionalAnswers.description,
     				                        ~~~~~~~~~~~~~~~~~


Found 11 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `tsc`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/thomas/.npm/_logs/2019-08-13T18_03_41_774Z-debug.log
lerna ERR! npm run build exited 2 in 'n8n-node-dev'
lerna ERR! npm run build exited 2 in 'n8n-node-dev'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.

I did not have the issue with the commas, so that might be related to Windows. But the later error remains.

Here are my globally installed npm packages on Linux Mint:

npm list -g --depth 0
/usr/lib
├── @vue/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├──  error: ENOENT: no such file or directory, lstat '/home/thomas/workspace/hads
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY [email protected]
├── [email protected]
└── [email protected]

npm ERR! peer dep missing: [email protected], required by [email protected]
npm ERR! error in /usr/lib/node_modules/hads: ENOENT: no such file or directory, lstat '/home/thomas/workspace/hads'


On the subject of welcoming potential contributors, a link to a short video explaining what lerna is and what it does would be nice. Also a short description of what role have the different packages would help ;)

from n8n.

janober avatar janober commented on August 26, 2024

Ah very great that it works now!

If you check out the old version on Linux you actually do not reproduce the previous issue. If you compare the error messages they are totally different. The one you get on Linux is the one I talked about before with that inquirer renamed a type "inquirer.Questions" -> "inquirer.QuestionCollection".
The issue you had before on Windows did prevent TypeScript to even get that far to find that issues. So I somehow guess that if you get back to work tomorrow it maybe still does not work for you directly (even though I really hope I am wrong). If that is the case and you figure out what the problem was please still post the answer her anyway in case somebody else runs into the same issue on this project or another.

Thanks a lot for the feedback! Will add it to my list and improve it the next days.

And btw. welcome to the project. Great to have you on board!

from n8n.

janober avatar janober commented on August 26, 2024

Improved now the documentation:
https://github.com/n8n-io/n8n/blob/master/CONTRIBUTING.md

If you think anything else should be added please simply add it. A pair of fresh eyes can judge that for sure much better. Thanks!

from n8n.

thomasleveil avatar thomasleveil commented on August 26, 2024

Just another though regarding contributing (and attracting contributors).

I'm not convinced by the monorepo thing (and need for lerna to handle it). I understand a maintainer of the project would have a better life with the monorepo form and lerna. But on the other hand, wanna-be-contributors are firstly users of the app who are missing a features or are annoyed by a bug. Such wanna-be-contributors won't have much time to learn how to use lerna and to discover how things are organised and linked together in a monorepo, because it won't bring much value to them. That might be a deterrent.

I guess users try to become contributors with the following cases :

  • As a user of the application, I'm stuck because of a bug caused by the code of a Node. I want to quickly hack on a single node code, be able to deploy it quickly to my existing app and go on with my life
  • As a user of the application, I'm missing a functionality on a node configuration (ignore SSL errors on the HTTPRequestNode for instance), I want to quickly grab that node code and be able to deploy it in my currently deployed app
  • As a user of the application and as a Vue developer, I'm glad to discover the n8n editor is in Vue.js, I wish I can improve the UI, but I don't care about the other stuff.

from n8n.

janober avatar janober commented on August 26, 2024

Guess there it is how it is with almost all things. Everything has its advantages and disadvantages.
The mono repro is for sure not always great and also caused me very often headaches. However not sure if not using one would really be easier. Because even in the simple case that somebody only wants to make changes to the UI he would still have to have the backend running to connect to it. So that means that user would then suddenly have to check out, install dependencies and start two things. He does not just have to run "npm run dev" once, like right now anymore, which starts everything. And for all changes which do not just involve the frontend but also the backend he would have to commit things separate. Currently, when a bigger change gets made it is one commit where afterward everything thing fits perfectly together. In a multi-repro he would have to commit in up to 5 different repositories (n8n-cli, n8n-core, n8n-editor, n8n-nodes-base, n8n-workflow) separate where the code then also has to be looked at separately. That would not just make it more complicated for things like testing (as I would then have to check each of them out separate then link them together manually) it would also increase the risk that things are not compatible with each other anymore.

So I kind of fear that changing that would replace one problem with an even bigger one. For sure would make it easier for one time contributors but would drive the more involved people crazy.

At least that is what I think would happen. If there is however a good solution for things like mentioned above, I am more than open for any better solution. Is not that I think mono repro is always the way to go but not without reason are more and more projects switching to it and not without reason have also one of the biggest companies in tech mono repositories.

from n8n.

thomasleveil avatar thomasleveil commented on August 26, 2024

Keeping the monorepo, the contributing documentation could welcome new users with shortcuts for frequent contribution cases like :

  • I want to hack the UI
  • I want to hack nodes

giving for each of those cases quick instructions on how to get setup without explaining to much about the other parts of the monorepo project.

from n8n.

janober avatar janober commented on August 26, 2024

Yes, that sounds like a very good idea! Also think that could help new contributors a lot and so hopefully attract more.

from n8n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.