FranckFreiburger / vue-pdf

vue.js pdf viewer
MIT License
2.23k stars 523 forks source link

npm install 后内部依赖pdfjs-dist版本会升级问题 #314

Open ZGH0717 opened 3 years ago

ZGH0717 commented 3 years ago

To install them, you can run: npm install --save pdfjs-dist/es5/build/pdf.js worker-loader!pdfjs-dist/es5/build/pdf.worker.js pdfjs-dist/es5/web/pdf_viewer

messieurspeng commented 3 years ago

We have the same problem

kjhtrtg commented 3 years ago

我们也遇到了相同的问题,mac不行,windows是好的

messieurspeng commented 3 years ago

我的windows重新npm install就会出现这个问题

messieurspeng commented 3 years ago

我发现重新npm install的node_modules\pdfjs-dist 里面没有es5这个文件夹 从原来的项目把es5这个文件夹拷贝到新的项目 可以正常运行

kjhtrtg commented 3 years ago

npm install就报错

BugBugGoAway commented 3 years ago

遇到同样问题,求fix办法

qihua-1996 commented 3 years ago

安装 pdfjs-dist 2.4.456版本,虽然控制还是报错,但是不影响使用

steele-cjf commented 3 years ago

在项目的package.json中写死 "pdfjs-dist": "2.5.207" 依赖可以解决

ThinkHap commented 3 years ago

今天下午被这问题搞了一下午

Ashwanth-kumar commented 3 years ago

Hi... Can anyone please help me.. i'm facing the same error in vue-pdf

ERROR in ./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js&) Module not found: Error: Can't resolve 'pdfjs-dist/es5/build/pdf.js' in '/app/node_modules/vue-pdf/src' @ ./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js&) 7:14-52 @ ./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js& @ ./node_modules/vue-pdf/src/vuePdfNoSss.vue @ ./src/app.js @ multi ./src/app.js

ERROR in ./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js&) Module not found: Error: Can't resolve 'pdfjs-dist/es5/build/pdf.worker.js' in '/app/node_modules/vue-pdf/src' @ ./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js&) 10:22-81 @ ./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js& @ ./node_modules/vue-pdf/src/vuePdfNoSss.vue @ ./src/app.js @ multi ./src/app.js

ERROR in ./node_modules/vue-pdf/src/pdfjsWrapper.js Module not found: Error: Can't resolve 'pdfjs-dist/es5/web/pdf_viewer' in '/app/node_modules/vue-pdf/src' @ ./node_modules/vue-pdf/src/pdfjsWrapper.js 1:0-63 157:28-42 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js& @ ./node_modules/vue-pdf/src/vuePdfNoSss.vue?vue&type=script&lang=js& @ ./node_modules/vue-pdf/src/vuePdfNoSss.vue @ ./src/app.js @ multi ./src/app.js

alex-eri commented 3 years ago

duplicate #315

alex-eri commented 3 years ago

在项目的package.json中写死 "pdfjs-dist": "2.5.207" 依赖可以解决

2.7 works too

liuyahui32 commented 3 years ago

怎么解决这个问题呢,vue-pdf版本是4.20

FlowRays commented 3 years ago

一周前还没有这个问题,不知道为什么这几天正常安装vue-pdf就是不行

jikoy commented 3 years ago

遇到同样的问题,我是vue3 + vue-pdf4.2 希望尽快解决!

mwangli commented 3 years ago

项目组被卡了三四天,好几个前端,没解决问题 image

mwangli commented 3 years ago

指定一下pdfjs-dist的版本就解决了 image

Har-zheng commented 3 years ago

同样也遇到了 估计插件 依赖升级的问题 希望早点大佬修复下

jikoy commented 3 years ago

@大佬

PeopleWhoListenToStories commented 3 years ago

安装楼上推荐的 pdfjs-dist@2.7 完美解决

Har-zheng commented 3 years ago

项目的package.json 写入 "pdfjs-dist": "2.7" 依赖 暂时这样可以解决

vickey155 commented 3 years ago

项目的package.json 写入 "pdfjs-dist": "2.7" 依赖 可以解决

shizhihuaxu commented 3 years ago

jikoy commented 3 years ago

我的没有这一项啊。 image

PeopleWhoListenToStories commented 3 years ago

我的没有这探测啊。 图像 npm install pdfjs-dist@2.7 -D