title: npm run build with parcel throws an error
body: <p>Installed node, ran npm init to create package.json, installed parcel. running the server with npx parcel index.html runs the server. Then I changed &quot;scripts&quot; to &quot;start&quot;: &quot;parcel index.html&quot; in package.json, and run npm run start, it also runs the server without a problem. And then I added to &quot;scripts&quot; &quot;build&quot;: &quot;parcel build index.html&quot; and run npm run build. But this does not work...
  I get the error below...</p>
  <pre><code>&gt; vjezba-17@1.0.0 build  
  &gt; parcel build index.html
  
  × Build failed.
  
  @parcel/namer-default: Target &quot;main&quot; declares an output file path of &quot;index.js&quot; which does not match the compiled bundle type &quot;html&quot;.
  
    C:\Users\ijevr\Desktop\JavaScript\vjezba 17\package.json:4:11
      3 |   &quot;version&quot;: &quot;1.0.0&quot;,
    &gt; 4 |   &quot;main&quot;: &quot;index.js&quot;,
    &gt;   |           ^^^^^^^^^^ Did you mean &quot;index.html&quot;?
      5 |   &quot;scripts&quot;: {
      6 |     &quot;start&quot;: &quot;parcel index.html&quot;,
  
    ℹ Try changing the file extension of &quot;main&quot; in package.json.
  </code></pre>
  <p>Of course, changing the main to index.html states that the file should be a .js file... index.js is what the npm init created in the package.json. In my folder, my main js file is named script.js, and it was named like this before I ran npm init. However changing the main to script.js also does not help, I get the same error as stated here...</p>
  <p>I don't know what to do to npm build it...</p>