question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

parcel 2 cannot build typescript project

See original GitHub issue

Choose one: is this a ๐Ÿ› bug report or ๐Ÿ™‹ feature request? bug report

๐ŸŽ› Configuration (.babelrc, package.json, cli command)

 "targets": {
    "browser": {
      "main": "src/Main.ts",
      "publicUrl": "./"
    }
  }

๐Ÿค” Expected Behavior

build sucessfully

๐Ÿ˜ฏ Current Behavior

when i run parcel build src/Main.ts, itโ€™ll run , but nothing show up, and the cpu usage is about 30%, even i have waited it for half hour, still same

๐Ÿ’ Possible Solution

not sure

๐Ÿ”ฆ Context

A Typescript H5 Game

๐Ÿ’ป Code Sample

๐ŸŒ Your Environment

Software Version(s)
Parcel 2.0.0-alpha.1.1
Node 12.9.1
npm/Yarn 6.11.2
Operating System arch linux

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
phauxcommented, Oct 22, 2019

The project builds when I simplify it by removing almost everything and rendering simple โ€œhello worldโ€ with react + react-dom. It seems to be failing when it has to bundle material-ui

0reactions
mischniccommented, Mar 19, 2020
import React from "react";
import { render } from "react-dom";
import { Button } from "@material-ui/core";

function App() {
	return <Button color="primary">Hello World</Button>;
}

render(<App />, document.getElementById("app"));

works correctly now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript - Parcel
TypeScript is a typed superset of JavaScript that compiles to JavaScript. Parcel supports TypeScript out of the box without any additional configuration.
Read more >
Create a Typescript library with demo page using Parcel 2
Parcel build by default everything he needs in the dist folder until you specify another one using the --dist-dir flag.
Read more >
parcel - npm
Start using parcel in your project by running `npm i parcel`. ... config JSX and TypeScript compilation, Parcel makes it easy to build...
Read more >
What you need to know about Parcel 2 - LogRocket Blog
Let's look at the latest version of the JavaScript bundling tool Parcel and its new features that can help developers build faster websites....
Read more >
Making Parcel Work With TypeScript - Setting up Auto ...
Let's set up auto compilation for TypeScript using Parcel as a bundler for our project. This is the easiest way to watch and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found