FranckFreiburger / vue-pdf

vue.js pdf viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue2项目编译报错

BayMax619 opened this issue · comments

ERROR Failed to compile with 1 error 上午8:48:14

error in ./node_modules/pdfjs-dist/es5/build/pdf.worker.js

Syntax Error: TypeError: The 'compilation' argument must be an instance of Compilation

ERROR in ./node_modules/pdfjs-dist/es5/build/pdf.worker.js (./node_modules/worker-loader/dist/cjs.js!./node_modules/pdfjs-dist/es5/build/pdf.worker.js)
Module build failed (from ./node_modules/worker-loader/dist/cjs.js):
TypeError: The 'compilation' argument must be an instance of Compilation
at getCompilationHooks (D:\skeleton\node_modules\webpack\lib\javascript\JavascriptModulesPlugin.js:143:10)
at D:\skeleton\node_modules\webpack\lib\javascript\ArrayPushCallbackChunkFormatPlugin.js:41:19
at Hook.eval [as call] (eval at create (D:\skeleton\node_modules\tapable\lib\HookCodeFactory.js:19:10), :7:1)
at Hook.CALL_DELEGATE [as _call] (D:\skeleton\node_modules\tapable\lib\Hook.js:14:14)
at Compiler.newCompilation (D:\skeleton\node_modules@vue\cli-service\node_modules\webpack\lib\Compiler.js:1121:30)
at D:\skeleton\node_modules@vue\cli-service\node_modules\webpack\lib\Compiler.js:1166:29
at Hook.eval [as callAsync] (eval at create (D:\skeleton\node_modules\tapable\lib\HookCodeFactory.js:33:10), :24:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (D:\skeleton\node_modules\tapable\lib\Hook.js:18:14)
at Compiler.compile (D:\skeleton\node_modules@vue\cli-service\node_modules\webpack\lib\Compiler.js:1161:28)
at Compiler.runAsChild (D:\skeleton\node_modules@vue\cli-service\node_modules\webpack\lib\Compiler.js:561:8)
at Object.pitch (D:\skeleton\node_modules\worker-loader\dist\index.js:115:19)

这个可以解决,#25 (comment)

能解决吗 我现在还是报错