1
votes

I'm a beginner in angular2, I'm following different bits of tutorials. Below is the structure of their files:

Link of tutorial relative to image below:

https://www.udemy.com/ultimate-angular-2/learn/v4/t/lecture/5723842

enter image description here

Link of tutorial relative to image below:

https://www.youtube.com/watch?v=DBjPIabiRNg

enter image description here

Mine is different it's missing the config, dist, node_modules, tmp and typings folder:

enter image description here

I'm using these versions:

$node -v
v6.6.0
$npm -v
3.10.7
$ng -v
angular-cli: 1.0.0-beta.15
node: 6.6.0
os: darwin x64

Error of the angular-cli installation:

https://gist.github.com/kim-montano/df9d492ce83768b744fc9a5f6d8bf498

Steps I did:

  1. Downloaded: https://nodejs.org/en/download/current/
  2. I ran this command: $ npm install -g angular-cli
  3. Went to a folder in the documents where I want the angular2 project to appear.
  4. Typed this: ng new first-app
1
have u got any errors when you install it using cli command..?Outlooker
Hi @Outlooker, I've edited my question. I included a link so you can look at the error logs. IDK if this is important but I didn't use sudo since I followed the instruction here: docs.npmjs.com/getting-started/fixing-npm-permissionsKim Montano
I also included the steps I did prior to generating the new project.Kim Montano
could you please post your package.json file..?Outlooker
Outlooker thanks for looking into this. Here's the package generated by angular-cli: gist.github.com/kim-montano/b827d6bc62eb04439e4a6f6383ffb9c6Kim Montano

1 Answers

0
votes

It is possible that as 1.0.0-beta.15 was released yesterday (20/09/2016), the tutorial you are viewing is using an older version of the CLI, which could have a different file structure.

It would be useful if you provided more details, in order for people to be able to assist you.


Update: You mention that you are missing node_modules folder. This may be because you have not run npm install to install the project dependencies. The tmp and dist folders are relevant to when you do a build of your project.