fingerpan / vue-cli-plugin-dll

Vue CLI 3 plugin for Webpack DllPlugin/DllReferencePlugin
MIT License
76 stars 22 forks source link

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function #11

Closed JessicaSachs closed 5 years ago

JessicaSachs commented 5 years ago

Inside of fileNameCachePlugin.js#saveCacheFileNameList it seems that fs.writeFile is expecting a callback as the third argument.

When I patch it locally by passing the callback in as a third argument, my dll builds fine.

Version vue-cli-plugin-dll@1.1.2 Node Version: 10.14.2 (lts)

Stacktrace:

╰─ npx vue-cli-service dll
Starting build dll...
fs.js:129
  throw new ERR_INVALID_CALLBACK();
  ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:129:9)
    at Object.writeFile (fs.js:1159:14)
    at Function.saveCacheFileNameList (/Users/jessicasachs/projects/tags/node_modules/vue-cli-plugin-dll/src/fileNameCachePlugin.js:9:12)
    at compiler.hooks.emit.tapAsync (/Users/jessicasachs/projects/tags/node_modules/vue-cli-plugin-dll/src/fileNameCachePlugin.js:24:33)
    at _err0 (eval at create (/Users/jessicasachs/projects/tags/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:12:1)
    at /Users/jessicasachs/projects/tags/node_modules/neo-async/async.js:2825:7
    at done (/Users/jessicasachs/projects/tags/node_modules/neo-async/async.js:2861:11)
    at /Users/jessicasachs/projects/tags/node_modules/neo-async/async.js:2813:7
    at /Users/jessicasachs/projects/tags/node_modules/graceful-fs/graceful-fs.js:45:10
    at FSReqWrap.oncomplete (fs.js:141:20)
fingerpan commented 5 years ago

i fixed this bug.