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

run ./bin/webpack with --json flag in webpacker:compile #199

Merged
merged 1 commit into from
Mar 28, 2017
Merged

run ./bin/webpack with --json flag in webpacker:compile #199

merged 1 commit into from
Mar 28, 2017

Conversation

thomas-mcdonald
Copy link
Contributor

this flag was removed in #153, but without it the error handling block
throws a JSON::ParserError and dumps the webpack output:

Webpacker is installed 🎉 🍰
Using /home/ubuntu/x/config/webpack/paths.yml file for setting up webpack paths
Compiling webpacker assets 🎉
(node:13993) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
rake aborted!
JSON::ParserError: 784: unexpected token at 'Hash: 07f7572619a3f21f5769
Version: webpack 2.3.2
Time: 5959ms
                                 Asset      Size  Chunks             Chunk Names
   application-8fe35cff8405fc080848.js    144 kB       0  [emitted]  application
application-8fe35cff8405fc080848.js.gz   43.8 kB          [emitted]  
                         manifest.json  68 bytes          [emitted]  
   [3] ./~/object-assign/index.js 2.11 kB {0} [
(rest of output omitted)

The error results with this flag aren't a great deal clearer - there's a lot of noise printed, but it does get rid of the misleading JSON error and puts the actual issue at the at the top level:

Webpacker is installed 🎉 🍰
Using /Users/thomasm/code/x/config/webpack/paths.yml file for setting up webpack paths
Compiling webpacker assets 🎉
(node:93604) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
./app/javascript/x/Dispatcher.js
Module not found: Error: Can't resolve 'no' in '/Users/thomasm/code/x/app/javascript/x'
resolve 'no' in '/Users/thomasm/code/x/app/javascript/x'
  Parsed request is a module
  using description file: /Users/thomasm/code/x/package.json (relative path: ./app/javascript/x)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/thomasm/code/x/package.json (relative path: ./app/javascript/x)
... continues

this flag was removed in #153, but without it the error handling block
throws a `JSON::ParserError` and dumps the webpack output
@gauravtiwari
Copy link
Member

@thomas-mcdonald thanks for bringing it back 🍰 I think we should merge this one.

@dhh dhh merged commit c4d912d into rails:master Mar 28, 2017
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

Successfully merging this pull request may close these issues.

3 participants