How to find module “fs” in VS Code with TypeScript?

前端 未结 6 1795
一生所求
一生所求 2021-01-30 12:17

I\'m running on a MacBook Air. I installed VS Code as an IDE and also have TypeScript installed.

I have a simple file with just this line:

import fs = req         


        
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 12:50

    "fs" is a core Node module and I think your import statement syntax is a little off. Try:

    import * as fs from "fs";
    

提交回复
热议问题