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

DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic #31

Open
axetroy opened this issue Mar 8, 2017 · 11 comments

Comments

@axetroy
Copy link

axetroy commented Mar 8, 2017

I config the plugin use example in [email protected]

build and throw an error

$ npm run build

> @axetroy/[email protected] build C:\Users\axetroy\gpmx\github.com\axetroy\event-emitter.js
> webpack --display-error-details --progress --colors

 10% building modules 1/1 modules 0 active(node:4544) 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.                                                    91% additional asset processingevents.js:                                                    160
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1022:11)
    at Socket._writeGeneric (net.js:712:26)
    at Socket._write (net.js:731:8)
    at doWrite (_stream_writable.js:334:12)
    at writeOrBuffer (_stream_writable.js:320:5)
    at Socket.Writable.write (_stream_writable.js:247:11)
    at Socket.write (net.js:658:40)
    at Socket.Writable.end (_stream_writable.js:480:10)
    at Socket.end (net.js:428:31)
    at Object.exports.compile (C:\Users\axetroy\gpmx\github.com\axetroy\event-emitter.js\node_modules\webpack-closure-compiler\lib\runner.js:72:25)
    at C:\Users\axetroy\gpmx\github.com\axetroy\event-emitter.js\node_modules\webpack-closure-compiler\index.js:70:9
    at C:\Users\axetroy\gpmx\github.com\axetroy\event-emitter.js\node_modules\async\lib\async.js:987:13
    at Immediate.process (C:\Users\axetroy\gpmx\github.com\axetroy\event-emitter.js\node_modules\async\lib\async.js:953:21)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @axetroy/[email protected] build: `webpack --display-error-details --progress --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @axetroy/[email protected] build script 'webpack --display-error-details --progress --colors'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @axetroy/event-emitter.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack --display-error-details --progress --colors
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @axetroy/event-emitter.js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @axetroy/event-emitter.js
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\axetroy\gpmx\github.com\axetroy\event-emitter.js\npm-debug.log

@roman01la
Copy link
Owner

@axetroy Not sure if this issue is related to the plugin, please make sure your Webpack config is valid. If everything is ok on your side, a minimal repro example would be nice to have so I can reproduce the issue.

@axetroy
Copy link
Author

axetroy commented Mar 9, 2017

@roman01la
I am pretty sure the Webpack config is valid.

only load this plugin and Babel.
Babel work as expect. once load plugin, it throw this error.

it this plugin not compatible with Webpack2?

@roman01la
Copy link
Owner

@axetroy It is compatible. I need a minimal project to reproduce the issue, so I can help you.

@axetroy
Copy link
Author

axetroy commented Mar 9, 2017

@roman01la
thanks, I'm organizing the project
response you soon

@axetroy
Copy link
Author

axetroy commented Mar 9, 2017

@roman01la

I create a mini project in here https://github.com/axetroy/webpack-closure-compiler-example

run the command

git clone https://github.com/axetroy/webpack-closure-compiler-example.git
yarn    # npm install
yarn run build    # npm run build

@roman01la
Copy link
Owner

@axetroy thanks, I'll try this later today and get back to you

@mhdatie
Copy link

mhdatie commented Apr 6, 2017

I'm receiving the same exact issue on Windows. I have an npm script with a MINIFY flag that is set to true in production and adds this plugin to the webpack. The development build works fine and setting the MINIFY flag to false in production also works.

@roman01la
Copy link
Owner

@axetroy I was about to test the project but the repo appears to be deleted. Could you please bring it back? Sorry for delay.

@csentis
Copy link

csentis commented May 21, 2017

@roman01la recommend looking up this webpack loader-utils issue and setting process.traceDeprecation = true in (one of) your webpack config files. The line goes somewhere in the header, outside the webpack config object. If it is really your plugin then it will report accordingly.

@bansawbanchee
Copy link
Collaborator

This is actually not an issue with this plugin. ADVANCED compilation with Google Closure Compiler requires you to use externs when referencing external JavaScript. E.g window or any third party node_modules, such as the one listed in above output (https://github.com/axetroy/event-emitter.js) that you are including. I recommend taking a look at the docs for ADVANCED compilation located here: https://developers.google.com/closure/compiler/docs/api-tutorial3

@roman01la
Copy link
Owner

Does anyone still experience the issue?

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

5 participants