Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Webpack compiling #109

Closed
microshine opened this issue Nov 11, 2016 · 3 comments
Closed

Error: Webpack compiling #109

microshine opened this issue Nov 11, 2016 · 3 comments

Comments

@microshine
Copy link

microshine commented Nov 11, 2016

I'm trying to compile my project webcrypto-liner, which has dependecy of elliptic. But I've got a error on webpack compiling in elliptic.js

ERROR in ./~/elliptic/package.json
Module parse failed: C:\github\webcrypto-liner\node_modules\elliptic\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 
    at Parser.pp.unexpected 
    at Parser.pp.semicolon 
    at Parser.pp$1.parseExpressionStatement 
    ...
@ ./~/elliptic/lib/elliptic.js 5:19-45
@fanatid
Copy link
Contributor

fanatid commented Nov 11, 2016

@microshine why not create issue in webpack repository?

@microshine microshine changed the title Error: Weppack compiling Error: Webpack compiling Nov 11, 2016
@swansontec
Copy link

swansontec commented Dec 14, 2016

This isn't an elliptic problem at all, but a problem with your Webpack config. Please add the following lines to webpack.config.js:

loaders: [
  { test: /\.json$/, loader: 'json-loader' }
]

And add json-loader to your devDependencies in package.json.

@microshine
Copy link
Author

thank you. It works for me

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

No branches or pull requests

3 participants