打字稿错误:找不到模块“ fs”?

在过去的一个小时里,我一直在尝试以某种方式导入'fs'以使用它的readFileSync-function。 我无法正常工作。我已经尝试过在类似线程中找到的所有内容。 Fyi:我正在使用TS 3.5.3 我的tsconfig.json

{
"compileonSave": false,"compilerOptions": {
  "baseUrl": "./","outDir": "./dist/out-tsc","sourceMap": true,"declaration": false,"module": "es2015","moduleResolution": "node","emitDecoratorMetadata": true,"experimentalDecorators": true,"target": "es5","typeRoots": [
    "node_modules/@types","node_modules/@types/node"
  ],"types": [
    "node"
  ],"lib": [
    "es2018","dom"
  ] 
  }
}

我已经尝试过npm i --save-dev @types/node,但无济于事。

xuu805 回答:打字稿错误:找不到模块“ fs”?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2996512.html

大家都在问