Skip to content

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

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

Closed
cfv1984 opened this issue Feb 21, 2017 · 19 comments
Assignees

Comments

@cfv1984
Copy link

cfv1984 commented Feb 21, 2017

Hi all! I made a new webpack-simple project, and when running npm run build I get presented with the message in the title. Specifically:

404s will fallback to /index.html
webpack: wait until bundle finished: /dist/build.js
(node:568) 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.

This is visible when using performance: { hints: "warning" } in your webpack config.

Additionally, doing an npm run dev I get this warning text:

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (250 kB).
This can impact web performance.
Assets: 
  build.js (1.55 MB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (250 kB). This can impact web performance.
Entrypoints:
  main (1.55 MB)
      build.js


WARNING in webpack performance recommendations: 
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

What can be done about any of this two things? This is coming from a plain new vue init webpack-simple $myproject build, not something particularly involved and I'm not sure it is intentional

@lanlin
Copy link

lanlin commented Feb 22, 2017

same warning

image

here the link webpack/loader-utils#56

@chris-lsn
Copy link

chris-lsn commented Feb 22, 2017

same problem here

1 similar comment
@shmy
Copy link

shmy commented Feb 22, 2017

same problem here

@edmondyip
Copy link

How can i fix it?

@kazupon kazupon self-assigned this Feb 23, 2017
@wang2lang
Copy link

set process.noDeprecation = true , the warning will be removed

@yuhaoju
Copy link

yuhaoju commented Apr 20, 2017

@kazupon The warning seems to reappear at the line:
https://github.com/vuejs/vue-loader/blame/master/lib/loader.js#L435

@Been101
Copy link

Been101 commented May 7, 2017

where is the webpack config? how to set process.noDeprecation = true?

@miyalee
Copy link

miyalee commented May 12, 2017

@Rainjay where? use vue-cli,can't find any file named"webpack.config.js", "webpack.base.conf.js"? how to add it?

@xinghehaohan
Copy link

you need update:dev-server .js
var config = require('../config')
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
!!!! process.noDeprecation = true
}

@beckyao
Copy link

beckyao commented Sep 6, 2017

how to fix?

@connor11528
Copy link

Agree. Does process.noDeprecation = true go inside the webpack.config file?

@xlcrr
Copy link

xlcrr commented Sep 9, 2017

Getting this error with npm run production on laravel-mix. Previously everything was fine. Compiled assets file is missing x2 "/" characters to comment out Vue.js and Sizzle.js about code. Including the characters to comment out the file does not allow code to be pushed into production.

Might be worth noting that npm run dev compiles fine

@MartinDawson
Copy link

MartinDawson commented Sep 18, 2017

@connor11528 process.noDeprecation = true goes anwhere inside the webpack.config.js file. process is a global variable it seems.

Don't do this though. This just suppresses deprecation warnings but doesn't actually fix anything. Webpack should still load properly

@ohute-couture
Copy link

Is this fixed to #671?
I still have parseQuery() to use
vuejs/vue-loader/loader.js#L440

@DarkSide7H
Copy link

update: dev-server.js
var config = require('../config')
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
process.noDeprecation = true
}

@andreasvirkus
Copy link

+1 for @ohute-couture... I wish this was properly addressed on vue-loader's side instead of everyone suppressing warnings in their Webpack configs :/

@jmduke
Copy link

jmduke commented Apr 11, 2018

Why was this issue closed? I'm seeing this on 14.2.2 and it seems to be a valid issue.

@andreasvirkus
Copy link

andreasvirkus commented Apr 11, 2018

@jmduke I'm guessing since there was a potential fix by @yyx990803 with the pr 1d63e9e.

@zhangxiaowo
Copy link

你需要更新:dev-server .js
var config = require('../ config')
if(!process.env.NODE_ENV){
process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
! !process.noDeprecation = true
}

2.0中这个文件没有了 请问这个该怎么修改?

jbrialon pushed a commit to jbrialon/photo that referenced this issue Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests