You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -51,7 +60,13 @@ dependencies are installed and the packages get linked correctly. Here a short g
51
60
52
61
#### Node.js
53
62
54
-
We suggest using [Node.js](https://nodejs.org/en/) version 16 for development purposes.
63
+
We suggest using [Node.js](https://nodejs.org/en/) version 16.9 or newer for development purposes.
64
+
65
+
After that we recommend enabling [Node.js corepack](https://nodejs.org/docs/latest-v16.x/api/corepack.html) with `corepack enable`, and [pnpm](https://pnpm.io/) with `corepack prepare pnpm --activate`.
66
+
67
+
**IMPORTANT**: If you have installed Node.js via homebrew, you'll need to run `brew install corepack`, since homebrew explicitly removes `npm` and `corepack` from [the `node` formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/node.rb#L66).
68
+
69
+
**IMPORTANT**: If you are on windows, you'd need to run `corepack enable` and `corepack prepare pnpm --activate` in a terminal as an administrator.
55
70
56
71
#### Build tools
57
72
@@ -72,15 +87,14 @@ yum install gcc gcc-c++ make
72
87
Windows:
73
88
74
89
```
75
-
npm install -g windows-build-tools
90
+
npm add -g windows-build-tools
76
91
```
77
92
78
-
#### npm workspaces
93
+
#### pnpm workspaces
79
94
80
95
n8n is split up in different modules which are all in a single mono repository.
81
-
To facilitate the module management, [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces) are
82
-
used. This automatically sets up file-links between modules which depend on each
83
-
other.
96
+
To facilitate the module management, [pnpm workspaces](https://pnpm.io/workspaces) are used.
97
+
This automatically sets up file-links between modules which depend on each other.
84
98
85
99
### Actual n8n setup
86
100
@@ -112,20 +126,20 @@ checked out and set up:
112
126
5. Install all dependencies of all modules and link them together:
113
127
114
128
```
115
-
npm install
129
+
pnpm install
116
130
```
117
131
118
132
6. Build all the code:
119
133
```
120
-
npm run build
134
+
pnpm build
121
135
```
122
136
123
137
### Start
124
138
125
139
To start n8n execute:
126
140
127
141
```
128
-
npm run start
142
+
pnpm start
129
143
```
130
144
131
145
To start n8n with tunnel:
@@ -136,24 +150,24 @@ To start n8n with tunnel:
136
150
137
151
## Development cycle
138
152
139
-
While iterating on n8n modules code, you can run `npm run dev`. It will then
153
+
While iterating on n8n modules code, you can run `pnpm dev`. It will then
140
154
automatically build your code, restart the backend and refresh the frontend
141
155
(editor-ui) on every change you make.
142
156
143
157
1. Start n8n in development mode:
144
158
```
145
-
npm run dev
159
+
pnpm dev
146
160
```
147
161
1. Hack, hack, hack
148
162
1. Check if everything still runs in production mode
149
163
```
150
-
npm run build
151
-
npm run start
164
+
pnpm build
165
+
pnpm start
152
166
```
153
167
1. Create tests
154
168
1. Run all [tests](#test-suite)
155
169
```
156
-
npm run test
170
+
pnpm test
157
171
```
158
172
1. Commit code and [create a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)
159
173
@@ -162,7 +176,7 @@ automatically build your code, restart the backend and refresh the frontend
162
176
The tests can be started via:
163
177
164
178
```
165
-
npm run test
179
+
pnpm test
166
180
```
167
181
168
182
If that gets executed in one of the package folders it will only run the tests
0 commit comments