Issues installing Ember on Mac

I’ve been attempting to install Ember on my MacOS 10.14 and I encounter a problem in the terminal. Screen Shot 2021-01-14 at 3.02.31 PM

Every time I try to create a new Ember app, there’s an “unexpected token” error involving a catch block associated with ember-cli.

Hi @Tanfa_LDW, welcome to Ember! How is your node environment installed? I see that you ran with sudo which typically you shouldn’t need to do (or probably want to do). You’ll also want to install ember-cli as a global package. Maybe just trying installing globally without sudo will work:

npm install -g ember-cli

If that still causes issues… you may want to re-install or fix your node setup. I personally like to use nvm as it helps you easily install/change/remove different node environments.

Hi, @Tanfa_LDW. Welcome to Ember.js community! I’m sorry to hear that you might have had a bad first experience with installing Ember.

I noticed in your screenshot that you added sudo. To my understanding, we don’t need to elevate the permission to admin.

Have you tried the instructions in Quick Start - Getting Started - Ember Guides? I think the commands that you will want to run are:

# Install Ember CLI globally. This is so that
# you can create an Ember app from anywhere on
# your machine.
npm install -g ember-cli

# Use Ember CLI to create an Ember app
ember new my-first-app

The second command will (1) create a folder called my-first-app and (2) install dependencies using npm as the package manager. If you prefer to use yarn, you can run the following command instead:

# Use yarn for package manager
ember new my-first-app --yarn

Finally, let’s run the app.

# Run the app locally
ember serve

Once the app is running, you can open a browser and visit http://localhost:4200 to see the default welcome page.

Can you try these steps and let us know how they went?

Best,

I reinstalled Node, and I was able to successfully create an Ember app and run it. Thank you for your answer.

1 Like