Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
Trying to build project with parcel, but keep running into unsupported file type error

I am trying to build a project with parcel. I have followed all the instructions from my assignment, yet this error keeps showing up on my terminal whenever I try to run:

parcel src/index.html

This is the error message:

Build failed.

@parcel/core: Unexpected output file type .html in target "main"

C:\Users\johan\myflix-client\package.json:4:11 3 | "version": "1.0.0",

4 | "main": "src/index.html", | ^^^^^^^^^^^^^^^^ File extension must be .js, .mjs, or .cjs 5 | "scripts": { 6 | "test": "echo "Error: no test specified" && exit 1"

ℹ The "main" field is meant for libraries. If you meant to output a .html file, either remove the "main" field or choose a different target name.

I have even tried to remove the "main" altogether even though I was told that I needed it there, and it just throws more errors.

Please any help on this is greatly appreciated!

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

In package.json, you can try changing "main" to "default":

"default": "index.html"

about 4 years ago · Juan Pablo Isaza Report

0

changing "main" to "default" (in package.json) fixed the problem for me!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!