Saturday 6 May 2017

Importing nodejs `fs` with typescript when executing with ts-node?

I'm trying to run the following code with ts-node.

import { writeFileSync, readFileSync } from 'fs';

However I get:

src/main/ts/create.ts (1,45): Cannot find module 'fs'. (2307)

What do I need to do in to allow typescript to import the fs module?



via Ole

No comments:

Post a Comment