Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

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

Closed
hetasanghvi-zz opened this issue Jan 17, 2018 · 3 comments
Closed

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

hetasanghvi-zz opened this issue Jan 17, 2018 · 3 comments

Comments

@hetasanghvi-zz
Copy link

hetasanghvi-zz commented Jan 17, 2018

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

  • Windows

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.

  • no

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
Copy link

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

@gesinger
Copy link
Contributor

gesinger commented Mar 2, 2018

Closing in favor of #600

@gesinger gesinger closed this as completed Mar 2, 2018
@gesinger
Copy link
Contributor

gesinger commented Mar 2, 2018

If you are still having issues, please try out webwackify (see #600 (comment) )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants