0

According to the docs, I can use feathers/client but when I try

let feathers = require('feathers/client'); let app = feathers();

which is compiled by webpack, I get

./~/feathers/package.json
Module parse failed: /home/jiewmeng/Dropbox/expenses-app/node_modules/feathers/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.raise (/home/jiewmeng/Dropbox/expenses-app/node_modules/webpack/node_modules/acorn/dist/acorn.js:918:13)
    at Parser.pp.unexpected (/home/jiewmeng/Dropbox/expenses-app/node_modules/webpack/node_modules/acorn/dist/acorn.js:1480:8)
    at Parser.pp.semicolon (/home/jiewmeng/Dropbox/expenses-app/node_modules/webpack/node_modules/acorn/dist/acorn.js:1459:73)

Whats wrong?

Jiew Meng
  • 84,767
  • 185
  • 495
  • 805

1 Answers1

3

Their client contains a line like this:

createApplication.version = require('../../package.json').version;

That will make webpack to process the package.json of their project. This will fail unless you have set up json-loader.

Juho Vepsäläinen
  • 26,573
  • 12
  • 79
  • 105