Cross-platform installation script for Neuron SDK components.
- Node.js 18 or higher
- npm (comes with Node.js)
- Go 1.23 or higher
- git
iwr -useb https://raw.githubusercontent.com/NeuronInnovations/neuron-node-builder-installer/main/install.ps1 | iexNote: If you get an execution policy error, use one of these alternatives:
# Option 1: Bypass execution policy for this session
powershell -ExecutionPolicy Bypass -File install.ps1
# Option 2: Run directly with bypass
powershell -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/NeuronInnovations/neuron-node-builder-installer/main/install.ps1 | iex"curl -fsSL https://raw.githubusercontent.com/NeuronInnovations/neuron-node-builder-installer/main/install.sh -o install.sh ; chmod +x install.sh ; ./install.sh.\install.ps1Or with force flag to skip prompts:
.\install.ps1 -Forcechmod +x install.sh
./install.shchmod +x install.sh
./install.shThis installer sets up a portable Neuron Node-RED environment by building its components from source on your machine. It performs the following steps:
- Checks Prerequisites: Verifies that Node.js (v18+), npm, Go (v1.23+), and Git are installed on your system.
- Clones Repositories: Downloads the source code for
neuron-node-builder(a Node.js project) and optionallyneuron-sdk-websocket-wrapper(a Go project) from their respective GitHub repositories. - Installs Dependencies: Installs the necessary project dependencies using
npm installfor Node.js projects andgo mod tidyfor Go projects. - Builds Projects: Compiles the
neuron-node-builderusingnpm run buildand, if selected, builds the Go SDK into an executable usinggo build. - Integrates Components: Configures the environment by setting up
.envandflows.jsonfiles. If the Go SDK was built, it copies or symlinks its executable into theneuron-node-builder/build/bindirectory, making it accessible to the Node-RED environment.
The "one-click install" refers to the ease of running this installation script, and "portable" describes the resulting self-contained Node-RED environment.
This installer utilizes three main scripts, each with a distinct role:
install.js(Node.js script): This is the core logic of the installer. Written in JavaScript, it performs the main installation steps: checking Go version, cloning repositories, setting up configuration, installing dependencies, building projects, and integrating components. It's designed to be cross-platform.install.sh(Bash script): This is a shell wrapper specifically for macOS and Linux environments. Its primary role is to prepare the environment (e.g., checking Node.js/npm, downloadinginstall.jsif needed) and then executeinstall.js. It also handles starting the installed application.install.ps1(PowerShell script): This is a shell wrapper specifically for Windows environments. Similar toinstall.sh, it prepares the Windows environment, executesinstall.js, and handles post-installation application launch, but uses PowerShell commands.
In essence, install.js contains the detailed installation instructions, while install.sh and install.ps1 are platform-specific launchers that ensure install.js runs correctly on their respective operating systems.
This installer is designed to set up a Neuron Node-RED environment by building its components directly from source on your local machine. This approach is particularly useful for:
- Developers: Who wish to contribute to the Neuron Node Builder or Neuron SDK, allowing for local development, customization, and debugging.
- Specific Build Requirements: Users who need to compile with particular flags, versions of dependencies, or in environments with restricted internet access.
- Transparency: Users who prefer to build software from source for verification and control.
For official, pre-built, signed, and notarized releases of the Neuron Node Builder, please refer to the Neuron Node Builder GitHub Releases page. These official releases are generated via a comprehensive GitHub Actions workflow that handles packaging, code signing, and notarization for various platforms.
The releases.json file in this repository is consumed by the neuron/services/NeuronUpdateService.js component within the neuron-node-builder repository. This service uses the information in releases.json to determine when to trigger auto-updates for the Neuron Node-RED environment. For the auto-update mechanism to function correctly, releases.json must contain valid release information, including download URLs for different platforms and architectures.
- Node.js not found: Install from nodejs.org
- Go not found: Install from golang.org/dl
- Permission denied: On Linux/Mac, make sure the script is executable with
chmod +x install.sh - Git not found: The script will fail with a clear error if git isn't installed