- Motivation
- Problem
- Solution
- Instructions
- Troubleshoot
- Supported versions
- Issues regarding node's build system
Build, develop and debug node on macOS.
Node uses gyp as it's build system.
No IDE for mac is known to support gyp.
Use CMake to build node on CLion.
- install Xcode
- clone your node fork
cd node
npm install -g node-cmake-generator
- run
node-cmake-generator
- open the project in CLion
- build the node target
- enjoy :)
By default CLion runs CMake with a -j 4
flag in order to reduce build time by running 4 compilation jobs concurrently.
For some reason, the icudata__icutrim target fails to build if running concurrenlty.
One option is run CMake with a -j 1
flag:
Preferences -> Build, Execution, Deployment -> CMake -> Build options:
An alternative is to build the icudata__icutrim target independently and only then build the node target.
- node: 8.7.0, 8.9.0, 8.9.4, 12.0.0, 10.15.4
- macOS: Sierra 10.12.4, High Sierra 10.13.3, 10.13.6
- CLion: 2017.1.3, 2017.3, 2018.1, 2019.1
- CMake: 3.7.2, 3.9.4, 3.10.2, 3.13.4