0

I was following this tutorial. The writer mentions that I need to install node.js which I did. It is installed in

C:\users\me\AppData\Roaming\npm

After that the writer says I need to create a folder called project which I did. The folder is here

C:\users\me\project

Next the writer says that I need to

Run the npm init command from inside that directory.

which I don't understand. When I start command prompt as administrator I get

C:\Windows\System32>

when I run it without administrator, I get

C:\users\me>

How do I go inside my project directory then?

I have never used Gulp before and only once or twice used command prompt. I have been searching for a few hours now but I could not find anything. Maybe I am using the wrong search terms. Any help would be appreciated.

Why was it downvoted? If I could find the answer I swear I would not have posted this question and I clearly mentioned that I am a beginner.

SanJeet Singh
  • 1,291
  • 2
  • 15
  • 28

1 Answers1

1

First off your problem has nothing to do with gulp specifically. You're not "working with directories in Gulp" as your title puts it. You're just working with directories in the Windows commmand prompt (cmd).

You should probably read a tutorial on how to use cmd first, before using a command line tool like gulp. Here's one for example.

To answer your question: open cmd as a non-admin user. You're now in the \users\me directory. Type:

cd project

You're now in the \users\me\project directory and can issue the npm init command.

Sven Schoenung
  • 30,224
  • 8
  • 65
  • 70
  • The person who downvoted still should have mentioned why my question was downvoted. How am I supposed to know the exact problem if someone does not tell me? Thanks it worked :) I have one more question I can't ask it for 1.5 hours can you please answer it here otherwise I would be stuck. – SanJeet Singh Feb 13 '16 at 13:05
  • I have this message in console `npm WARN project@1.0.0 No repository field.` what does it mean? – SanJeet Singh Feb 13 '16 at 13:07
  • You can ignore that. It means your `package.json` file doesn't have a `repository` field. See [this answer](http://stackoverflow.com/questions/16827858/npm-warn-package-json-no-repository-field). – Sven Schoenung Feb 13 '16 at 13:11
  • One more thing how do I update lodash or can I ignore this too `npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. project@1.0.0`? – SanJeet Singh Feb 13 '16 at 13:15
  • If you have `lodash` as a dependency in your `package.json` file, then edit the version to say `^4.0.0`. If you don't have `lodash` in your `package.json` file you can ignore it. – Sven Schoenung Feb 13 '16 at 13:19
  • thanks you have been very helpful. I have just one more question. In the tutorial I am following the writer says about file structure that I need an `app` folder. Where do I have to create the `app` folder? Is it inside the project folder? – SanJeet Singh Feb 13 '16 at 13:35
  • Yes, in the project folder. – Sven Schoenung Feb 13 '16 at 13:38