npm run build failing with below error
ERROR Failed to compile with 9 errors
I am following this document to get n8n locally
Tried cleaning lerna but didn’t work, Has anyone else experienced this before on mac m1? Does anyone know how to fix this?
npm run build failing with below error
ERROR Failed to compile with 9 errors
I am following this document to get n8n locally
Tried cleaning lerna but didn’t work, Has anyone else experienced this before on mac m1? Does anyone know how to fix this?
Hey @sushant_a,
Welcome to the community ![]()
I am currently using an M1 Mac but not have not seen this before, It looks like the lerna command was missed.
Can you confirm the exact commands you ran and the order? Is it also a fresh clone of the repo or one you have been working on?
Hi @Jon
Thanks
I followed these steps and Its fresh clone
git clone https://github.com/n8n-io/n8n
cd n8n
lerna bootstrap --hoist
npm run build
npm run start
Hey @sushant_a,
Interesting, They should work it is the same steps I take. Did the lerna command fail at all? Can you try again with the latest code base in a different folder?
On lerna bootstrap --hoist,it succeed
lerna notice cli v5.3.0
lerna info versioning independent
lerna info Bootstrapping 7 packages
lerna WARN EHOIST_PKG_VERSION "n8n-workflow" package depends on eslint@^7.32.0, which differs from the hoisted eslint@^8.0.0.
lerna info Installing external dependencies
lerna info hoist Installing hoisted dependencies into root
lerna info hoist Pruning hoisted dependencies
lerna info hoist Finished pruning hoisted dependencies
lerna info hoist Finished bootstrapping root
lerna info Symlinking packages and binaries
lerna success Bootstrapped 7 packages
I Deleted the folder performed steps again but still gets the same error.
ERROR Build failed with errors.
lerna ERR! npm run build exited 1 in 'n8n-editor-ui'
lerna ERR! npm run build exited 1 in 'n8n-editor-ui'
Hi @sushant_a,
I encountered the same error recently, on a Mac M1.
Have you checked that you are running node js on version 16, using node --version ?
If not, you can :
brew install node@16
brew unlink node
brew link —overwrite node@16
echo 'export PATH="/opt/homebrew/opt/node@16/bin:$PATH"' >> ~/.zshrc
Hope this helps !
That is a good shout, I had assumed Node 16 but I don’t think we have updated that doc to mention it yet.
I was on using node v14 so I upgraded node to 16 and linked it but still it throws the same error

Any other possible problems?
Hey @sushant_a,
Could you run the steps again and send over the full output?
Here is full output.
➜ development node --version
v16.16.0
➜ development git clone https://github.com/n8n-io/n8n.git
Cloning into 'n8n'...
remote: Enumerating objects: 113846, done.
remote: Counting objects: 100% (455/455), done.
remote: Compressing objects: 100% (254/254), done.
remote: Total 113846 (delta 221), reused 410 (delta 197), pack-reused 113391
Receiving objects: 100% (113846/113846), 64.75 MiB | 384.00 KiB/s, done.
Resolving deltas: 100% (91035/91035), done.
➜ development cd n8n
➜ n8n git:(master) lerna bootstrap --hoist
lerna notice cli v5.3.0
lerna info versioning independent
lerna info Bootstrapping 7 packages
lerna info Installing external dependencies
lerna info hoist Installing hoisted dependencies into root
lerna info hoist Pruning hoisted dependencies
lerna info hoist Finished pruning hoisted dependencies
lerna info hoist Finished bootstrapping root
lerna info Symlinking packages and binaries
lerna success Bootstrapped 7 packages
➜ n8n git:(master) ✗ npm run build
> [email protected] build
> 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
> tsc
> [email protected] build
> npm run build:theme
> [email protected] build:theme
> gulp build:theme
[19:16:38] Using gulpfile ~/development/n8n/packages/design-system/gulpfile.js
[19:16:38] Starting 'build:theme'...
[19:16:38] Starting 'compileTheme'...
[19:16:41] Finished 'compileTheme' after 2.76 s
[19:16:41] Starting 'copyThemeFonts'...
[19:16:41] Finished 'copyThemeFonts' after 33 ms
[19:16:41] Finished 'build:theme' after 2.8 s
> [email protected] build
> tsc
> [email protected] build
> cross-env VUE_APP_PUBLIC_PATH="/%BASE_PATH%/" vue-cli-service build
⠇ Building for production...
> [email protected] build
> tsc && gulp build:icons && gulp build:translations
⠏ Building for production...[19:17:58] Using gulpfile ~/development/n8n/packages/nodes-base/gulpfile.js
[19:17:58] Starting 'build:icons'...
⠙ Building for production...[19:17:58] Finished 'build:icons' after 423 ms
[19:17:59] Using gulpfile ~/development/n8n/packages/nodes-base/gulpfile.js
[19:17:59] Starting 'build:translations'...
Default locale set to: en
No translation required - Skipping translations build...
[19:17:59] Finished 'build:translations' after 1.71 ms
⠇ Building for production...
ERROR Failed to compile with 10 errors 7:18:35 PM
error in src/App.vue:22:25
TS7016: Could not find a declaration file for module './views/LoadingView.vue'. '/Users/sushantawalekar/development/n8n/packages/editor-ui/src/views/LoadingView.vue.js' implicitly has an 'any' type.
20 | <script lang="ts">
21 | import Modals from './components/Modals.vue';
> 22 | import LoadingView from './views/LoadingView.vue';
| ^^^^^^^^^^^^^^^^^^^^^^^^^
23 | import Telemetry from './components/Telemetry.vue';
24 | import { HIRING_BANNER, VIEWS } from './constants';
25 |
error in src/components/DeleteUserModal.vue:57:10
TS2305: Module '"n8n-design-system"' has no exported member 'N8nUserSelect'.
55 | import { IUser } from "../Interface";
56 | import { mapGetters } from "vuex";
> 57 | import { N8nUserSelect } from 'n8n-design-system';
| ^^^^^^^^^^^^^
58 |
59 | export default mixins(showMessage).extend({
60 | components: {
error in src/components/InputPanel.vue:73:22
TS7016: Could not find a declaration file for module './WireMeUp.vue'. '/Users/sushantawalekar/development/n8n/packages/editor-ui/src/components/WireMeUp.vue.js' implicitly has an 'any' type.
71 | import mixins from 'vue-typed-mixins';
72 | import NodeExecuteButton from './NodeExecuteButton.vue';
> 73 | import WireMeUp from './WireMeUp.vue';
| ^^^^^^^^^^^^^^^^
74 | import { CRON_NODE_TYPE, INTERVAL_NODE_TYPE, LOCAL_STORAGE_MAPPING_FLAG, START_NODE_TYPE } from '@/constants';
75 |
76 | export default mixins(
error in src/components/MainSidebar.vue:190:34
TS7016: Could not find a declaration file for module './GiftNotificationIcon.vue'. '/Users/sushantawalekar/development/n8n/packages/editor-ui/src/components/GiftNotificationIcon.vue.js' implicitly has an 'any' type.
188 |
189 | import ExecutionsList from '@/components/ExecutionsList.vue';
> 190 | import GiftNotificationIcon from './GiftNotificationIcon.vue';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191 | import WorkflowSettings from '@/components/WorkflowSettings.vue';
192 |
193 | import { genericHelpers } from '@/components/mixins/genericHelpers';
error in src/components/Modals.vue:139:48
TS7016: Could not find a declaration file for module './CommunityPackageManageConfirmModal.vue'. '/Users/sushantawalekar/development/n8n/packages/editor-ui/src/components/CommunityPackageManageConfirmModal.vue.js' implicitly has an 'any' type.
137 |
138 | import AboutModal from './AboutModal.vue';
> 139 | import CommunityPackageManageConfirmModal from './CommunityPackageManageConfirmModal.vue';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140 | import CommunityPackageInstallModal from './CommunityPackageInstallModal.vue';
141 | import ChangePasswordModal from "./ChangePasswordModal.vue";
142 | import ContactPromptModal from './ContactPromptModal.vue';
error in src/components/NodeCreator/NoResults.vue:43:27
TS7016: Could not find a declaration file for module './NoResultsIcon.vue'. '/Users/sushantawalekar/development/n8n/packages/editor-ui/src/components/NodeCreator/NoResultsIcon.vue.js' implicitly has an 'any' type.
41 | import { HTTP_REQUEST_NODE_TYPE, REQUEST_NODE_FORM_URL, WEBHOOK_NODE_TYPE } from '@/constants';
42 | import Vue from 'vue';
> 43 | import NoResultsIcon from './NoResultsIcon.vue';
| ^^^^^^^^^^^^^^^^^^^^^
44 |
45 | export default Vue.extend({
46 | name: 'NoResults',
error in src/components/RunData.vue:367:28
TS7016: Could not find a declaration file for module '@/components/WarningTooltip.vue'. '/Users/sushantawalekar/development/n8n/packages/editor-ui/src/components/WarningTooltip.vue.js' implicitly has an 'any' type.
365 |
366 | import BinaryDataDisplay from '@/components/BinaryDataDisplay.vue';
> 367 | import WarningTooltip from '@/components/WarningTooltip.vue';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
368 | import NodeErrorView from '@/components/Error/NodeErrorView.vue';
369 |
370 | import { copyPaste } from '@/components/mixins/copyPaste';
error in src/components/VersionCard.vue:49:28
TS7016: Could not find a declaration file for module './WarningTooltip.vue'. '/Users/sushantawalekar/development/n8n/packages/editor-ui/src/components/WarningTooltip.vue.js' implicitly has an 'any' type.
47 | import TimeAgo from './TimeAgo.vue';
48 | import Badge from './Badge.vue';
> 49 | import WarningTooltip from './WarningTooltip.vue';
| ^^^^^^^^^^^^^^^^^^^^^^
50 | import { IVersionNode } from '@/Interface';
51 |
52 | Vue.component('NodeIcon', NodeIcon);
error in src/plugins/i18n/index.ts:14:2
TS2459: Module '"n8n-design-system"' declares 'locale' locally, but it is not exported.
12 | } from "./utils";
13 | import {
> 14 | locale,
| ^^^^^^
15 | } from 'n8n-design-system';
16 |
17 | import englishBaseText from './locales/en.json';
error in src/views/SettingsUsersView.vue:41:10
TS2305: Module '"n8n-design-system"' has no exported member 'N8nUsersList'.
39 | import SettingsView from './SettingsView.vue';
40 | import PageAlert from '../components/PageAlert.vue';
> 41 | import { N8nUsersList } from 'n8n-design-system';
| ^^^^^^^^^^^^
42 | import { IUser } from '@/Interface';
43 | import mixins from 'vue-typed-mixins';
44 | import { showMessage } from '@/components/mixins/showMessage';
Error parsing bundle asset "/Users/sushantawalekar/development/n8n/packages/editor-ui/dist/js/app.32326af0.js": no such file
Error parsing bundle asset "/Users/sushantawalekar/development/n8n/packages/editor-ui/dist/js/chunk-2d0b325a.75271eb0.js": no such file
Error parsing bundle asset "/Users/sushantawalekar/development/n8n/packages/editor-ui/dist/js/chunk-2d2073c1.44215119.js": no such file
Error parsing bundle asset "/Users/sushantawalekar/development/n8n/packages/editor-ui/dist/js/chunk-2d22d3e6.d14ffd31.js": no such file
Error parsing bundle asset "/Users/sushantawalekar/development/n8n/packages/editor-ui/dist/js/chunk-da232adc.3e2187e6.js": no such file
Error parsing bundle asset "/Users/sushantawalekar/development/n8n/packages/editor-ui/dist/js/chunk-vendors.525bce99.js": no such file
Error parsing bundle asset "/Users/sushantawalekar/development/n8n/packages/editor-ui/dist/editor.worker.js": no such file
Error parsing bundle asset "/Users/sushantawalekar/development/n8n/packages/editor-ui/dist/json.worker.js": no such file
Error parsing bundle asset "/Users/sushantawalekar/development/n8n/packages/editor-ui/dist/ts.worker.js": no such file
No bundles were parsed. Analyzer will show only original module sizes from stats file.
Webpack Bundle Analyzer saved report to /Users/sushantawalekar/development/n8n/packages/editor-ui/dist/report.html
ERROR Build failed with errors.
lerna ERR! npm run build exited 1 in 'n8n-editor-ui'
lerna ERR! npm run build exited 1 in 'n8n-editor-ui'
➜ n8n git:(master) ✗
That is odd, I just gave it another go and it is still working
I am really not sure what is going, I have given it a test on another M1 I have access to that I had to install Node on and that was all good as well.
I will have a think.
> node --version
v16.16.0
~/code/test ..................................................... 03:18:27 pm
> git clone https://github.com/n8n-io/n8n.git
Cloning into 'n8n'...
remote: Enumerating objects: 114189, done.
remote: Counting objects: 100% (799/799), done.
remote: Compressing objects: 100% (412/412), done.
remote: Total 114189 (delta 416), reused 686 (delta 382), pack-reused 113390
Receiving objects: 100% (114189/114189), 65.25 MiB | 2.54 MiB/s, done.
Resolving deltas: 100% (91247/91247), done.
~/code/test ............................................... 28s | 03:19:00 pm
> cd n8n
~/code/test/n8n | master ........................................ 03:19:58 pm
> lerna bootstrap --hoist
lerna notice cli v5.3.0
lerna info versioning independent
lerna info Bootstrapping 7 packages
lerna info Installing external dependencies
lerna info hoist Installing hoisted dependencies into root
lerna info hoist Pruning hoisted dependencies
lerna info hoist Finished pruning hoisted dependencies
lerna info hoist Finished bootstrapping root
lerna info Symlinking packages and binaries
lerna success Bootstrapped 7 packages
~/code/test/n8n | master !1 ............................... 48s | 03:20:50 pm
> npm run build
> [email protected] build
> 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
> npm run build:theme
> [email protected] build
> tsc
> [email protected] build:theme
> gulp build:theme
[15:20:58] Using gulpfile ~/Code/test/n8n/packages/design-system/gulpfile.js
[15:20:58] Starting 'build:theme'...
[15:20:58] Starting 'compileTheme'...
[15:20:59] Finished 'compileTheme' after 1.02 s
[15:20:59] Starting 'copyThemeFonts'...
[15:20:59] Finished 'copyThemeFonts' after 11 ms
[15:20:59] Finished 'build:theme' after 1.03 s
> [email protected] build
> cross-env VUE_APP_PUBLIC_PATH="/%BASE_PATH%/" vue-cli-service build
> [email protected] build
> tsc
⠙ Building for production...Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
⠏ Building for production...
> [email protected] build
> tsc && gulp build:icons && gulp build:translations
⠋ Building for production...[15:21:21] Using gulpfile ~/Code/test/n8n/packages/nodes-base/gulpfile.js
[15:21:21] Starting 'build:icons'...
⠙ Building for production...[15:21:21] Finished 'build:icons' after 117 ms
⠹ Building for production...[15:21:21] Using gulpfile ~/Code/test/n8n/packages/nodes-base/gulpfile.js
[15:21:21] Starting 'build:translations'...
Default locale set to: en
No translation required - Skipping translations build...
[15:21:21] Finished 'build:translations' after 839 μs
⠹ Building for production...
WARNING Compiled with 2 warnings 15:21:52
warning
asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
json.worker.js (260 KiB)
ts.worker.js (4.51 MiB)
js/app.825cfdf6.js (795 KiB)
css/chunk-vendors.cf7bc09e.css (362 KiB)
js/chunk-vendors.33451db4.js (4.98 MiB)
warning
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
app (6.22 MiB)
css/chunk-vendors.cf7bc09e.css
js/chunk-vendors.33451db4.js
css/app.5f3842fa.css
js/app.825cfdf6.js
Webpack Bundle Analyzer saved report to /Users/jon/Code/test/n8n/packages/editor-ui/dist/report.html
File Size Gzipped
dist/js/chunk-vendors.33451db4.js 5102.72 KiB 1347.53 KiB
dist/ts.worker.js 4622.17 KiB 1038.13 KiB
dist/js/app.825cfdf6.js 794.80 KiB 199.64 KiB
dist/json.worker.js 260.45 KiB 78.30 KiB
dist/editor.worker.js 135.16 KiB 44.64 KiB
dist/js/chunk-2d0b325a.75271eb0.js 36.89 KiB 9.71 KiB
dist/js/chunk-2d22d3e6.d14ffd31.js 28.91 KiB 7.23 KiB
dist/js/chunk-da232adc.3e2187e6.js 5.93 KiB 2.11 KiB
dist/js/chunk-2d2073c1.44215119.js 5.00 KiB 1.97 KiB
dist/css/chunk-vendors.cf7bc09e.css 362.31 KiB 52.92 KiB
dist/css/app.5f3842fa.css 112.25 KiB 19.78 KiB
Images and other types of assets omitted.
DONE Build complete. The dist directory is ready to be deployed.
INFO Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html
> [email protected] build
> node scripts/build.mjs
lerna success exec Executed command in 7 packages: "npm run build"