ERROR in codes.json Unexpected token (2:7)
jamesdwilson opened this issue · 5 comments
jamesdwilson commented
ERROR in ./~/statuses/codes.json
Module parse failed: /home/james/projects/fakenewsbuster/node_modules/statuses/codes.json Unexpected token (2:7)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (2:7)
at Parser.pp$4.raise (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp.unexpected (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:603:10)
at Parser.pp.semicolon (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:581:61)
at Parser.pp$1.parseExpressionStatement (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:966:10)
at Parser.pp$1.parseStatement (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:730:24)
at Parser.pp$1.parseBlock (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:981:25)
at Parser.pp$1.parseStatement (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:709:33)
at Parser.pp$1.parseTopLevel (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:638:25)
at Parser.parse (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:516:17)
at Object.parse (/home/james/projects/fakenewsbuster/node_modules/webpack/node_modules/acorn/dist/acorn.js:3098:39)
@ ./~/statuses/index.js 15:12-35
dougwilson commented
How do I reproduce? What is the solution? Our tests don't have an issue, so no idea what I'm supposed to change b
jamesdwilson commented
I think this might be a problem with webpack.. please close for now. Thanks
dougwilson commented
@jamesdwilson can do. Let me know if you want to re-open and I can :)
DavidTPate commented
Yeah, for WebPack you just need to include the JSON loader for it to work.
bjrmatos commented
@jamesdwilson yes, webpack by default doesn't handle json files, you need to add JSON loader like @DavidTPate said