I can't launch n8n locally, even if I follow the instructions from the page "Creating Your First Node"

Hi,

I want to create a node, for this purpose, I followed the QuickStart from the page “Create your first node - n8n Documentation”.
I cloned the repo, and ran learn bootstrap --hoist (without changing anything in the directories). I got that result :

Error message

info cli using local version of lerna
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 7 packages
lerna WARN EHOIST_PKG_VERSION "n8n" package depends on @types/[email protected]^8.3.0, which differs from the hoisted @types/[email protected]^8.3.2.
lerna WARN EHOIST_PKG_VERSION "n8n-core" package depends on @types/[email protected]^8.3.4, which differs from the hoisted @types/[email protected]^8.3.2.
lerna WARN EHOIST_PKG_VERSION "n8n" package depends on [email protected]^4.1.1, which differs from the hoisted [email protected]~4.1.1.
lerna WARN EHOIST_PKG_VERSION "n8n" package depends on [email protected]^6.7.1, which differs from the hoisted [email protected]^6.5.0.
lerna WARN EHOIST_PKG_VERSION "n8n" package depends on [email protected]^8.3.0, which differs from the hoisted [email protected]^8.3.2.
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 ERR! npm install exited 1 in 'n8n'
lerna ERR! npm install stderr:
npm WARN deprecated @types/[email protected]: This is a stub types definition. bson provides its own type definitions, so you do not need this installed.
npm WARN deprecated @types/[email protected]: This is a stub types definition. open provides its own type definitions, so you do not need this installed.
npm WARN deprecated @types/[email protected]: This is a stub types definition for MQTT (https://github.com/mqttjs/MQTT.js). MQTT provides its own type definitions, so you don't need @types/mqtt installed!
npm WARN deprecated @types/[email protected]: This is a stub types definition. moment-timezone provides its own type definitions, so you do not need this installed.
npm WARN deprecated @types/[email protected]: This is a stub types definition. dotenv provides its own type definitions, so you do not need this installed.
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated [email protected]: Please upgrade to latest, [email protected] or [email protected]! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: 3.x is no longer supported
npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated [email protected]: [email protected]<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /Users/florian/WebstormProjects/n8n-test/n8n/node_modules/deasync
npm ERR! command failed
npm ERR! command sh -c node ./build.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.7 found at "/Users/florian/opt/anaconda3/bin/python"
npm ERR! (node:23090) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /Users/florian/opt/anaconda3/bin/python
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/florian/WebstormProjects/n8n-test/n8n/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/florian/WebstormProjects/n8n-test/n8n/node_modules/deasync/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/florian/WebstormProjects/n8n-test/n8n/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/florian/Library/Caches/node-gyp/17.9.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/florian/Library/Caches/node-gyp/17.9.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/florian/WebstormProjects/n8n-test/n8n/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/florian/Library/Caches/node-gyp/17.9.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/florian/WebstormProjects/n8n-test/n8n/node_modules/deasync',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR! 
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR! 
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR! 
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/florian/WebstormProjects/n8n-test/n8n/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.1.0
npm ERR! gyp ERR! command "/opt/homebrew/bin/node" "/Users/florian/WebstormProjects/n8n-test/n8n/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/florian/WebstormProjects/n8n-test/n8n/node_modules/deasync
npm ERR! gyp ERR! node -v v17.9.0
npm ERR! gyp ERR! node-gyp -v v5.1.1
npm ERR! gyp ERR! not ok 
npm ERR! Build failed

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/florian/.npm/_logs/2022-04-28T09_09_21_628Z-debug-0.log

lerna ERR! npm install exited 1 in 'n8n'

It is maybe not linked to n8n, I just saw that it tried to access to some files in the n8n folder.

Information on n8n setup

  • n8n version: 0.174.0
  • Database you’re using (default: SQLite): Default
  • Running n8n via npm
  • Node version : 17.9.0
  • Npm version : 8.6.0 (I ran npm config set legacy-peer-deps true)

Thanks in advance for the help !

Hi @florian1, welcome to the community!

I am sorry to hear you’re having trouble here. I don’t have an Apple machine, so can’t reproduce this on my side unfortunately. Two things worth trying based on the gyp: No Xcode or CLT version detected message and information you have shared:

  • Install Xcode from the Apple app store
  • Use Node v16 (which is the current LTS) - I’ve built a custom version of n8n using Node 16.

Just to add… I would start with running xcode-select --install you shouldn’t need all of xcode :slight_smile:

Hi,

Thanks to you two !

I tried to downgrade to node v16.0.0, this was not helpful.

Running xcode-select --install did not help neither, but I googled the linked error and found this : gyp: No Xcode or CLT version detected macOS Catalina | Anansewaa | by Allan Philip Barku | Medium

The solution 1 (running sudo xcode-select --reset) solved everything.

Thanks again for the help :slight_smile:

2 Likes

Nice, glad to hear this worked out. Thanks so much for sharing!

1 Like