title: Solving the 'npm WARN saveError ENOENT: no such file or directory, open '/Users/<username>/package.json'' error
body: <p><em>I'm a newbie so please include links to URLs or explain terminologies so I can understand.</em> </p>
  
  <p>I've managed to install 'npm' on a Mac OS (10.13.3) via the terminal, and have installed some packages like SASS using it. </p>
  
  <p>I'm now trying to install <a href="https://github.com/sass-mq/sass-mq" rel="noreferrer">sass-mq</a> using npm. I think I've managed to install it, but I'd like a second opinion on what I might have done that was incomplete, or wrong while doing it. </p>
  
  <p><strong>Initially, following the instructions on the sass-mq Github page, I was trying to use:</strong> </p>
  
  <pre><code>npm install sass-mq --save
  </code></pre>
  
  <p><strong>which gave me this error:</strong> </p>
  
  <pre><code>npm WARN saveError ENOENT: no such file or directory, open '/Users/&lt;username&gt;/package.json'
      npm WARN enoent ENOENT: no such file or directory, open '/Users/&lt;username&gt;/package.json'
      npm WARN &lt;username&gt; No description
      npm WARN &lt;username&gt; No repository field.
      npm WARN &lt;username&gt; No README data
      npm WARN &lt;username&gt; No license field.
  
      + sass-mq@5.0.0
      updated 1 package and audited 1 package in 1.67s
      found 0 vulnerabilities
  </code></pre>
  
  <p><strong>Looking around, I realised I'm meant to be using</strong></p>
  
  <pre><code>npm init
  </code></pre>
  
  <p><strong>..before typing my 'install sass-mq --save' command.</strong> </p>
  
  <p>Cool, done that. Next error was this: </p>
  
  <pre><code>package name: (nikhil) sass-mq
  version: (1.0.0) 
  description: 
  entry point: (index.js) 
  test command: 
  git repository: 
  keywords: 
  author: 
  license: (ISC) 
  About to write to /Users/nikhil/package.json:
  
  {
    "name": "sass-mq",
    "version": "1.0.0",
    "description": "",
    "main": "index.js",
    "dependencies": {
      "sass-mq": "^5.0.0"
    },
    "devDependencies": {},
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1"
    },
    "author": "",
    "license": "ISC"
  }
  
  
  Is this OK? (yes) 
  darwin:~ nikhil$ npm install sass-mq --save
  npm ERR! code ENOSELF
  npm ERR! Refusing to install package with name "sass-mq" under a package
  **npm ERR! also called "sass-mq". Did you name your project the same
  npm ERR! as the dependency you're installing?**
  </code></pre>
  
  <p>I think this is saying that I can't use 'sass-mq' (which is the name of the package, as the name of the local package (?) I'm installing into on my local machine. <a href="https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm" rel="noreferrer">Some more info here.</a></p>
  
  <p>So I simply tried this: </p>
  
  <pre><code>**package name: (sass-mq) media-queries-nikhil**
  version: (1.0.0) 
  description: 
  git repository: 
  keywords: 
  author: 
  license: (ISC) 
  About to write to /Users/nikhil/package.json:
  </code></pre>
  
  <p>and it seems to have worked OK.</p>
  
  <p><strong>My question is: Is this the right way I should have done this? How do you usually do this?</strong> </p>
  
  <p>Also, I get these warnings - is it OK to ignore them?</p>
  
  <pre><code>npm WARN media-queries-nikhil@1.0.0 No description
  npm WARN media-queries-nikhil@1.0.0 No repository field.
  </code></pre>
  
  <p>I'm creating this question in part so others like me looking for the answer to a similar issue can find an explanation, instead of just commands they need to fix their issue. I found a few similar question-threads, but none that actually explained what was happening and why. </p>
  
  <p>Thanks for reading, I really appreciate any help with this :) </p>