We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
this is my enviroment:
this is my package.json:
{ "devDependencies": { "@types/archiver": "^2.0.1", "@types/npm": "^2.0.29", "archiver": "^2.1.0", "ts-loader": "^3.2.0", "typescript": "^2.6.2", "webpack": "^3.10.0" } }
this my tsconfig.json:
{ "compilerOptions": { "target": "es5", "module": "commonjs", "outDir": "dist", "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, "declaration": true, "baseUrl": "src", "typeRoots": [ "node_modules/@types" ], "lib":[ "es2017", "dom" ] }, }
and finally this is my code:
import * as path from 'path'; import * as fs from 'fs'; import * as archiver from 'archiver'; const folderPath = path.resolve(__dirname+'/../tozip/'); const output = fs.createWriteStream('my-tarball.tar'); const arch = archiver('tar'); arch.pipe(output); arch.directory(folderPath,folderPath); arch.finalize();
after build, and run node... this is my output:
ReadStream.prototype = Object.create(fs$ReadStream.prototype) ^ TypeError: Cannot read property 'prototype' of undefined
Anyone have any idea for this behavior?
thank you
The text was updated successfully, but these errors were encountered:
OK, i'm solved this issue adding this into my webpack.config.js file:
module.exports = { /* other options*/ target: 'node', node: { fs: 'empty' } /* ... */ }
Sorry, something went wrong.
I'm running into the same issue. Is there a way to handle this without overriding the webpack.config.js?
webpack.config.js
so this is a webpack issue with node fs then?
No branches or pull requests
Hi,
this is my enviroment:
this is my package.json:
this my tsconfig.json:
and finally this is my code:
after build, and run node... this is my output:
Anyone have any idea for this behavior?
thank you
The text was updated successfully, but these errors were encountered: