Skip to content
New issue

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

me.error is not a function #107

Open
Fohlen opened this issue Jul 19, 2017 · 1 comment
Open

me.error is not a function #107

Fohlen opened this issue Jul 19, 2017 · 1 comment

Comments

@Fohlen
Copy link

Fohlen commented Jul 19, 2017

In the following example, running node v7.10.0 I get

TypeError: me.error is not a function
    at Writer (/Users/berger/workspace/inexor-flex/node_modules/unzip/node_modules/fstream/lib/writer.js:34:23)
    at new Extract (/Users/berger/workspace/inexor-flex/node_modules/unzip/lib/extract.js:30:16)
    at Object.Extract (/Users/berger/workspace/inexor-flex/node_modules/unzip/lib/extract.js:16:12)
    at repl:1:17
    at ContextifyScript.Script.runInThisContext (vm.js:23:33)
    at REPLServer.defaultEval (repl.js:339:29)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)
    at REPLServer.onLine (repl.js:536:10)
    at emitOne (events.js:101:20)

The example code is

const unzip = require('unzip')
const fs = require('fs')
const path = require('path')
const process = require('process')

let filePath = path.join(process.cwd(), 'somezip.zip')
let file = fs.createReadStream(filePath)
    .pipe(unzip.Extract({
        path: filePath.substr('.zip', '')
    }))

Am I using unzip wrong here?

@ChengYurou
Copy link

the same error occurred in node v8.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants