Browser: none
[x] This is a bug
'npm run serve' should work like always
'npm run serve' give me an "Error: Watching remote files is not supported.".
-> I cannot build / run anything with the dev-server
Running 'npm run serve' on any vue-cli boilerplate webapp
Looks you try to watch remove files
Running 'npm run serve' on any vue-cli boilerplate webapp
Sorry, i can't reproduce nothing, please create minimum reproducible test repo or provide your configuration
@docteurzoidberg still no configuration
@evilebottnawi i haven't any, it's the default vue-cli project !
@evilebottnawi > I found the bug; it's because of the pwd of my project: "c:\dev\test-broken"
It doesn't work on windows when parent dir is named DEV xD
I moved it elsewhere and now it works flawlessly, in another folder....
need investigate, maybe wrong regexp
Thanks for more information which can help us
https://i.imgur.com/etToqUI.png not working in c:\dev\test-broken
https://i.imgur.com/v41DGQP.png working in c:\users\drzoid\test-broken
Same project, working in any other folder with no "dev" parent folder
@docteurzoidberg can you provide you project, or minimum reproducible test repo, it can help fix problem fast, thanks
sorry, i don't have git to publish the repo on windows, i'm at camping right now. i will can do it next week.
The project is done with vue-cli ("npm install vue-cli -g"), then "vue init test-broken"
@docteurzoidberg no additional configurations?
@docteurzoidberg no additional configurations?
absolutly not, i was testing, all default settings from sample project
Thanks, we will look on this in near future
seems to depend entierly on path
some fails, some others don"t....
https://i.imgur.com/oQpvSuK.png
I think this issue about webpack-dev-server
I cannot reproduce this issue using MacOS. maybe only Windows.
I think a related pr is https://github.com/webpack/webpack-dev-server/pull/1980.
vue-cli is here.
In addition, We checked an URL strictly from this pr, so we might be better to revert it.
webpack-dev-server/lib/Server.js:
if (isAbsoluteUrl(String(contentBase)) || typeof contentBase === 'number') {
throw new Error('Watching remote files is not supported.');
}
Here the contentBase is default value(process.cwd()) which is absolute url, so you should specified a relative path in vue.config.js or webpack.config.js:
devServer: {
contentBase: './public'
}
This bug may reproduce in [email protected]
I think it is regression, we need fix it, PR, welcome, it is easy
My reply in the Vue CLI issue thread:
False-positive in https://github.com/sindresorhus/is-absolute-url (webpack-dev-server changed from testing
/https?:/to using this library in the 3.8 release)Please report to that repository.
I believe it's because of the lower case
c. But how come the lower case volume label? I thought it would always be UPPER CASE.
@sodatea thanks for investigate, what is the contentBase value you have? Just for infromation
@evilebottnawi In Vue CLI it's set to the user's public folder path, and it's an absolute path.
@sodatea i know, just want to see you contentBase
@evilebottnawi 馃槀I've never encountered such issues. I was just investigating based on the information @docteurzoidberg provided.
Came across the same issue, when running fresh new project from c:\work\project it fails, when it's from C:\work\project it works. I believe webpack-dev-server already had similar Windows path case-sensitivity issue last year.
@mnlj Yes, we had such a problem for a long time, before we check on absolute url only when you use contentBase as string, in [email protected] we start to check when you use array, so problem appears
Came across the same issue, when running fresh new project from
c:\work\projectit fails, when it's fromC:\work\projectit works. I believe webpack-dev-server already had similar Windows path case-sensitivity issue last year.
it definitely has since i got similar result to my error message on stackoverflow and i saw people having problem on older versions in webpack 3
Anyway PR welcome :+1:
I found VS-Code debug launcher in windows may start node.exe with cwd like 'c:\work', and cause this issue.
To reproduce the issue, create the file below, and run it with node.
node start-test.js
require('child_process').execSync('npm run serve', {
cwd: 'c:\\work\\project\\',
stdio: ['inherit', 'inherit', 'inherit']
})
Should be solved, just update deps
Most helpful comment
webpack-dev-server/lib/Server.js:
Here the contentBase is default value(
process.cwd()) which is absolute url, so you should specified a relative path in vue.config.js or webpack.config.js:This bug may reproduce in [email protected]