0

I'm going through the tutorial provided by Angular(https://docs.angularjs.org/tutorial) but I'm confused by the Node.js installation. I already have node installed globally on my mac. In the tutorial it states:

The tutorial instructions, from now on, assume you are running all commands from within the angular-phonecat directory.

Is the tutorial assuming that I do not have Node.js installed on my local machine? Or are these instructions for installing Node.js into my project folder? https://docs.angularjs.org/tutorial#install-node-js

When I run the command:

node --version

I get the result:

v7.4.0

And I get that result running the command in a new terminal as well.

1
  • based on the comments you have made, it seems like you aren't even reading what the tutorial says. install nodejs-legacy npm is only necessary on Debian, where there might be a conflict. It's not even an option on MacOS. Commented Jan 28, 2017 at 22:36

2 Answers 2

1

The tutorial assumes that node is installed but you are running any commands from inside the angular-phonecat directory.

i.e. in a terminal you should cd to the angular-phonecat directory and run whatever commands are instructed.

cd /path/to/angular-phonecat
node start

It sounds like your set up is fine but you should verify you are running a compatible version of NodeJS.

Sign up to request clarification or add additional context in comments.

2 Comments

so do I need to run brew install nodejs-legacy npm nodejs --version npm --version ???
@brandozz: you are probably fine with 7.4.0 but you might want to check. If you want or need to switch versions on the fly, I would recommend installing n. npm install -g n should do it.
0

You have node installed correctly already.

The bit about being in the angular-phonecat directly is just making sure you are in the directory where the package.json file is. When you run say npm install it will look in your current directory for a package.json file. So the demo just wants to make sure when they tell you to run commands that you are in the right directory.

1 Comment

Following the tutorial, when I run brew install nodejs-legacy npm... I get the error: Error: No formulae found in taps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.