Primitive Types in Flow

InstructorJosh Black

Share this video with your friends

Send Tweet

We'll go over some of the built-in types in Flow and how to add them to our projects by adding type annotations to our variables in JavaScript. We'll also learn about type mismatch errors when we give a variable a value that doesn't match its type annotation and how to fix it.

Damian Joniec
~ 5 years ago

at 0:39 I get that error: C:\Users\DamianJoniec\Documents\flow-annotation>npm run typecheck

flow-init@1.0.0 typecheck C:\Users\DamianJoniec\Documents\flow-annotation flow check src

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

Error: spawn C:\Users\DamianJoniec\Documents\flow-annotation\node_modules\flow-bin\vendor\flow ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:832:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) Emitted 'error' event at: at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12) at onErrorNT (internal/child_process.js:415:16) [... lines matching original stack trace ...] at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! flow-init@1.0.0 typecheck: flow check src npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the flow-init@1.0.0 typecheck script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\DamianJoniec\AppData\Roaming\npm-cache_logs\2019-07-25T08_44_20_820Z-debug.log