This topic is about any issues getting started with Forge. I’ll start with some common issues, but if you experience other issues, add a comment and hopefully someone will be able to help you.
[macOS] Error setting up Node.js, causing permission errors in macOS
Cause:
There are two ways to set up Node.js on macOS: 1. Using Node Version Manager (NVM). This is the recommended way. 2. Using the Node.js installer (i.e. downloading from Node.js — Download Node.js®)
Solution:
If you setup Node.js using the installer, try calling npm config set unsafe-perm true
in the Terminal window to fix the permissions problem.
If that doesn’t work, install Node.js using NVM as explained in https://developer.atlassian.com/platform/forge/installing-forge-on-macos/#set-up-node-js.
Working behind a proxy server
Cause:
Some companies require working behind a proxy server. To ensure Node.js can retrieve dependencies, you need to configure it to work with the proxy server.
Solution:
To configure Node.js to work with a proxy, use the following commands:
npm config set proxy http://user:password@proxy-url:port npm config set https-proxy http://user:password@proxy-url:port
Replace user
, password
, proxy-url
, and port
with your specific proxy settings.
[Windows] Unable to install Node.js on Windows
Casue:
A range of issues may prevent installing Node.js on Windows
Solution:
Following the guide at Fix problems that block programs from being installed or removed - Microsoft Support.
Installing the Forge CLI returns “spawn ts-node ENOENT” error
When running npm install -g @forge/cli
, the following error is returned:
Error: spawn ts-node ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19) …
Cause:
Node could be configured to run in development mode.
Solution:
Try running unset NODE_ENV
on macOS and Linux or set NODE_ENV=
on Windows to remove the environment variable and then try running npm install -g @forge/cli
to re-attempt installing the Forge CLI.
Cannot install ngrok
Cause:
The laptop has a restrictive software installation policy.
Solution:
Installing the ngrok
software is not necessary. You only need to create an ngrok.yml
config file as exaplined above.
Running a Forge command fails with “Error: Command failed due to validation error”
Cause:
The command was run outside the project directory. This normally happens after the initial forge create and forgetting to change the directory.
Solution:
Go to the newly created forge project directory i.e., cd .