vish4395 / laravel-file-viewer

A basic file viewer for Laravel projects.
MIT License
114 stars 19 forks source link

Wrong JS scripts is loaded #2

Closed rabol closed 1 year ago

rabol commented 1 year ago

in the layout file: <script src="{{ asset('vendor/laravel-file-viewer/officetohtml/jquery/jquery.min.js') }}"></script> that script does not exists

the assets that are published have this:

jquery-1.12.4.min.js
jquery-3.3.1.min.js
jquery-migrate-1.4.1.min.js

when trying to preview a .docx file I get theses error in th debug console

GET http://sign.test/vendor/laravel-file-viewer/officetohtml/jquery/jquery.min.js net::ERR_ABORTED 404 (Not Found)
network.js:71 The provided value 'moz-chunked-arraybuffer' is not a valid enum value of type XMLHttpRequestResponseType.
supportsMozChunkedClosure @ network.js:71
(anonymous) @ network.js:61
__w_pdfjs_require__ @ bootstrap b5fe8ab6eb949fc98816:19
(anonymous) @ pdf.js:34
__w_pdfjs_require__ @ bootstrap b5fe8ab6eb949fc98816:19
(anonymous) @ bootstrap b5fe8ab6eb949fc98816:65
(anonymous) @ bootstrap b5fe8ab6eb949fc98816:65
webpackUniversalModuleDefinition @ universalModuleDefinition:9
(anonymous) @ universalModuleDefinition:10
pptxjs.js:14 Uncaught TypeError: Cannot read properties of undefined (reading 'fn')
    at pptxjs.js:14:7
    at pptxjs.js:10187:2
(anonymous) @ pptxjs.js:14
(anonymous) @ pptxjs.js:10187
divs2slides.js:445 Uncaught TypeError: Cannot read properties of undefined (reading 'fn')
    at divs2slides.js:445:7
    at divs2slides.js:516:3
(anonymous) @ divs2slides.js:445
(anonymous) @ divs2slides.js:516
DevTools failed to load source map: Could not load content for http://sign.test/vendor/laravel-file-viewer/officetohtml/PPTXjs/js/nv.d3.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://sign.test/vendor/laravel-file-viewer/officetohtml/PPTXjs/css/nv.d3.min.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
jquery.verySimpleImageViewer.js:12 Uncaught TypeError: Cannot read properties of undefined (reading 'fn')
    at jquery.verySimpleImageViewer.js:12:7
    at jquery.verySimpleImageViewer.js:581:2
(anonymous) @ jquery.verySimpleImageViewer.js:12
(anonymous) @ jquery.verySimpleImageViewer.js:581
officeToHtml.js:10 Uncaught TypeError: Cannot read properties of undefined (reading 'event')
    at officeToHtml.js:10:7
    at officeToHtml.js:11684:2
(anonymous) @ officeToHtml.js:10
(anonymous) @ officeToHtml.js:11684
show:128 Uncaught TypeError: $ is not a function
    at show:128:5
(anonymous) @ show:128
DevTools failed to load source map: Could not load content for http://sign.test/vendor/laravel-file-viewer/officetohtml/officeToHtml/viewer.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
util.js:68 Uncaught TypeError: Cannot read properties of undefined (reading 'fn')
    at util.js:68:7
    at util.js:10:15
    at bootstrap.min.js:6:200
    at bootstrap.min.js:6:236
(anonymous) @ util.js:68
(anonymous) @ util.js:10
(anonymous) @ bootstrap.min.js:6
(anonymous) @ bootstrap.min.js:6
vish4395 commented 1 year ago

Hello @rabol , Thanks for open this issue. Please follow this release https://github.com/vish4395/laravel-file-viewer/releases/tag/1.0.2