Closed swkang73 closed 4 years ago
@swkang73 I tried an example with your tsconfig and my code built without errors. If you could provide a small example (gist or repo) the demonstrates the problem I can try to help diagnose the problem.
Hi @doug-martin , I'm experiencing the same issue with Angular 9. I was following this advice: https://stackoverflow.com/a/50212007/3928593 and added into fast-csv library package.json file with following lines:
"browser": {
"fs": false,
"os": false,
"path": false
}
and the error has disappeared. However I'm not able to use the library, it throws an error in console then:
Uncaught TypeError: Class extends value undefined is not a constructor or null
at Object.../../../node_modules/@fast-csv/format/build/src/CsvFormatterStream.js (vendor.js:111114)
at __webpack_require__ (runtime.js:80)
at Object.../../../node_modules/@fast-csv/format/build/src/index.js (vendor.js:111518)
at __webpack_require__ (runtime.js:80)
at Module../pages/search.component.ts (main.js:19874)
at __webpack_require__ (runtime.js:80)
at Module../app.routing.module.ts (main.js:1953)
at __webpack_require__ (runtime.js:80)
at Module../app.module.ts (main.js:1824)
at __webpack_require__ (runtime.js:80)
I'm trying to use fast-csv in my Angular Cli 8 project, but it's getting the following error:
I've checked
"@types/node": "^12.7.2"
is included as one of the dependencies inpackage.json
.The tsconfig.json looks like this:
Any idea why the 'fs' import isn't working?