Go Pro Sign Up Login

Buy Now and unlock this series

$

45

.99

$

24

.99

yours forever

Become a Pro and unlock everything

$

24

.99

per month

TypeScript At Compile Time With Parcel

Downloads

Become a pro to download code and videos

Comments

Geoff

4 months ago

Don't bother following this step of installing these packages. They are out of date, and the Parcel team does not even recommend doing this. See here for details:

https://parceljs.org/languages/typescript/#type-checking

Let the editor do the checking for you and then double-check everything in a CI pipeline (and/or a git commit pre-hook).

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Geoff

4 months ago [edited]

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Oh BTW I had to use --force when installing the packages; otherwise, I get some "ERESOLVE unable to resolve dependency tree" error.

Jens

6 months ago

Unfortunately installing the exact same packages in this video doesn't work for me; if I run 'parcel index.html' manually, I get that "Const declarations' require an initialization value" error.

When I run 'npm start', it does compile, but if I create an error like assigning a string to a boolean variable, it STILL compiles and doesn't complain.

Steve

8 months ago [edited]

As of Oct 7, 2021 -- This is still an issue. I tried to get this to work with the latest Parcel v2 -- but there's no equivalent plugin that works. Follow the video exactly and use the version Scott specifies and it will work correctly. (Use parcel-bundler, the v1 version as the video specifies even though it's deprecated.)

Andy Luo

11 months ago [edited]

Commenting here that the latest bundler throws a "Const declarations" require an initialization value error. Reverting to older bundler works.

Francis

about 1 year ago

As of May 15, 2021, the parcel bundler error has not been fixed!!!

User avatar

Stephen

about 1 year ago

I thought it was working, but as of 2/28/2021 it still seems off. I get an error 'const declartions require initial value'

But the line has an initial value const isOpen: boolean = false

Reverted to older bundler and works.

Dan

over 1 year ago

As of Jan. 24, 2021, the parcel bundler error has not yet been fixed. Continue to use Version 1.9.4

Mark Zhou

about 2 years ago

The issue seems more related to the plugin parcel-plugin-typescript (see here https://github.com/fathyb/parcel-plugin-typescript/issues/60) since it's requiring typescript module at version ^2.4.0. The issue remains open as of March 23, 2020. As recommended by Parcel doc (https://parceljs.org/typeScript.html), we can use tsc command with a tsconfig.json to compile until there's a fix.

User avatar

Sascha

over 2 years ago

January 25th in 2020... still not fixed...

Arion

over 2 years ago

I'm a developer using a Windows machine and followed all of these directions perfectly but am getting an unrelated error. This same block of code below is repeated in 2 second intervals after launching npm start. The type of error appears to be related to a dependency called "chokidar" and the "nodefs" dependency within it appears to include features related to handling Mac OS, which I assume is why it did not throw an error on the video, but would you know how to fix this? I would assume it is not mandatory to use a developer script that only operated in Mac OS? Interestingly, this error occurs 3 times BEFORE the build finalizes, then continues after the build confirmation. Any idea how to fix this?

āˆš Built in 10.74s.

events.js:187 throw er; // Unhandled 'error' event ^

Error: UNKNOWN: unknown error, watch at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:123:28) Emitted 'error' event on FSWatcher instance at: at FSWatcher._handleError (X:\testing\ts\node_modules\chokidar\index.js:260:10) at X:\testing\ts\node_modules\chokidar\lib\nodefs-handler.js:55:5 at Array.forEach () at fsWatchBroadcast (X:\testing\ts\node_modules\chokidar\lib\nodefs-handler.js:54:36) at FSWatcher. (X:\testing\ts\node_modules\chokidar\lib\nodefs-handler.js:100:9) at FSWatcher.emit (events.js:210:5) at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:129:12) { errno: -4094, syscall: 'watch', code: 'UNKNOWN', filename: null }

Tracy

over 2 years ago

As of December 20, 2019, the parcel bundler error has not been fixed.

Adam

over 2 years ago

As of Oct 20, 2019, the parcel bundler error seems to still not be fixed

Ali

almost 3 years ago

As of Aug 15, 2019, the parcel bundler error has not been fixed

Ryan C. Perry

almost 3 years ago

As of July 3, 2019, the parcel bundler error has not been fixed. Version 1.9.4 still works as expected.

Want to join the conversation?

Become a Pro member today!