videojs / videojs-contrib-hls

HLS library for video.js
http://videojs.github.io/videojs-contrib-hls/
Other
2.84k stars 793 forks source link

You may need an appropriate loader to handle this file type. #1319

Closed hetasanghvi-zz closed 6 years ago

hetasanghvi-zz commented 6 years ago

Description

Briefly describe the issue. the project is not building after installing videojs-contrib-hls and throwing error,

ERROR in ./~/videojs-swf/package.json Module parse failed: C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\videojs-swf\package.json Unexpected token (2:9) You may need an appropriate loader to handle this file type.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

I did, npm install videojs-contrib-hls npm istall gulp webpack

before installing videojs-contrib-hls the project was running fine.

Results

Expected

Please describe what you expected to happen that did not happen in the description.

I was expecting the project to run fine with hls source on any browser.

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with? videojs-contrib-hls x.y.z

videojs version

what version of videojs does this occur with? video.js 5.12.2

Browsers

what browsers are affected? please include browser and version for each *All

Platforms

what platforms are affected? please include operating system and version or device and version for each

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below. *I have video.js installed

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.

Error Output

ERROR in ./~/videojs-swf/package.json Module parse failed: C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\videojs-swf\package.json Unexpected token (2:9) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected token (2:9) at Parser.pp$4.raise (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:2221:15) at Parser.pp.unexpected (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:603:10) at Parser.pp.semicolon (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:581:61) at Parser.pp$1.parseExpressionStatement (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:966:10) at Parser.pp$1.parseStatement (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:730:24) at Parser.pp$1.parseBlock (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:981:25) at Parser.pp$1.parseStatement (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:709:33) at Parser.pp$1.parseTopLevel (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:638:25) at Parser.parse (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:516:17) at Object.parse (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\acorn\dist\acorn.js:3098:39) at Parser.parse (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack\lib\Parser.js:902:15) at DependenciesBlock. (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack\lib\NormalModule.js:104:16) at DependenciesBlock.onModuleBuild (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack-core\lib\NormalModuleMixin.js:310:10) at nextLoader (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack-core\lib\NormalModuleMixin.js:275:25) at C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack-core\lib\NormalModuleMixin.js:259:5 at Storage.provide (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:52:20) at CachedInputFileSystem.readFile (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:140:24) at DependenciesBlock.onLoadPitchDone (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack-core\lib\NormalModuleMixin.js:255:7) at DependenciesBlock.loadPitch (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack-core\lib\NormalModuleMixin.js:182:27) at DependenciesBlock.doBuild (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack-core\lib\NormalModuleMixin.js:241:4) at DependenciesBlock.build (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack\lib\NormalModule.js:84:14) at Compilation.buildModule (C:\workspace\la_box_sse_feature\la-box-self-service\node_modules\webpack\lib\Compilation.js:126:9) @ ./~/videojs-flash/dist/videojs-flash.cjs.js 6:19-54 [11:49:42] Finished 'webpack' after 33 s

bevikram commented 6 years ago

This is probably due to the loaders in the webpack, try to install a file-loader and add json under test.

gesinger commented 6 years ago

Closing in favor of https://github.com/videojs/videojs-contrib-hls/issues/600

gesinger commented 6 years ago

If you are still having issues, please try out webwackify (see https://github.com/videojs/videojs-contrib-hls/issues/600#issuecomment-363249094 )