error TS2792: Cannot find module 'mkdirp'
jimrand1 opened this issue · 1 comments
jimrand1 commented
Unable to use mkdirp. Typescript compiler throws error.
src/04/01-web-spider/spider.ts:3:22 - error TS2792: Cannot find module 'mkdirp'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
3 import {mkdirp} from 'mkdirp'
~~~~~~~~
did a npm install mkdirp. also tried npm install -g mkdirp
tsconfig.json
/* Language and Environment */
"target": "es2016",
/* Modules */
"module": "ES2020",
isaacs commented
module
and moduleResolution
must be nodenext
or node16
, or else TSC doesn't know to load modules like node.