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

"Error: Watching remote files is not supported" on windows with latest #2190

Closed
1 of 2 tasks
docteurzoidberg opened this issue Aug 12, 2019 · 29 comments · Fixed by #2202
Closed
1 of 2 tasks

"Error: Watching remote files is not supported" on windows with latest #2190

docteurzoidberg opened this issue Aug 12, 2019 · 29 comments · Fixed by #2202

Comments

@docteurzoidberg
Copy link

  • Operating System: Windows 10

  • Node Version: 10.16.1

  • NPM Version: 6.10.3

  • webpack Version: 4+

  • webpack-dev-server Version: 3.8.0

  • Browser: none

  • This is a bug

  • This is a modification request

Expected Behavior

'npm run serve' should work like always

Actual Behavior

'npm run serve' give me an "Error: Watching remote files is not supported.".
-> I cannot build / run anything with the dev-server

For Bugs; How can we reproduce the behavior?

Running 'npm run serve' on any vue-cli boilerplate webapp

@alexander-akait
Copy link
Member

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
Copy link
Author

vuejs/vue-cli#4424

@alexander-akait
Copy link
Member

@docteurzoidberg still no configuration

@docteurzoidberg
Copy link
Author

@evilebottnawi i haven't any, it's the default vue-cli project !

@docteurzoidberg
Copy link
Author

@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....

@alexander-akait
Copy link
Member

need investigate, maybe wrong regexp

@alexander-akait
Copy link
Member

alexander-akait commented Aug 12, 2019

Thanks for more information which can help us

@docteurzoidberg
Copy link
Author

docteurzoidberg commented Aug 12, 2019

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

@alexander-akait
Copy link
Member

alexander-akait commented Aug 12, 2019

@docteurzoidberg can you provide you project, or minimum reproducible test repo, it can help fix problem fast, thanks

@docteurzoidberg
Copy link
Author

docteurzoidberg commented Aug 12, 2019

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"

@alexander-akait
Copy link
Member

@docteurzoidberg no additional configurations?

@docteurzoidberg
Copy link
Author

@docteurzoidberg no additional configurations?

absolutly not, i was testing, all default settings from sample project

@alexander-akait
Copy link
Member

Thanks, we will look on this in near future

@docteurzoidberg
Copy link
Author

seems to depend entierly on path
some fails, some others don"t....
https://i.imgur.com/oQpvSuK.png

@n0code
Copy link

n0code commented Aug 12, 2019

@hiroppy
Copy link
Member

hiroppy commented Aug 12, 2019

I cannot reproduce this issue using MacOS. maybe only Windows.
I think a related pr is #1980.
vue-cli is here.

In addition, We checked an URL strictly from this pr, so we might be better to revert it.

@wjw99830
Copy link

wjw99830 commented Aug 13, 2019

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 webpack-dev-server@3.8.0

@alexander-akait
Copy link
Member

I think it is regression, we need fix it, PR, welcome, it is easy

@alexander-akait alexander-akait added this to the 3.8.1 milestone Aug 13, 2019
lbwa added a commit to lbwa/v-access that referenced this issue Aug 14, 2019
@sodatea
Copy link

sodatea commented Aug 14, 2019

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.

@alexander-akait
Copy link
Member

@sodatea thanks for investigate, what is the contentBase value you have? Just for infromation

@sodatea
Copy link

sodatea commented Aug 14, 2019

@evilebottnawi In Vue CLI it's set to the user's public folder path, and it's an absolute path.

@alexander-akait
Copy link
Member

@sodatea i know, just want to see you contentBase

@sodatea
Copy link

sodatea commented Aug 14, 2019

@evilebottnawi 😂I've never encountered such issues. I was just investigating based on the information @docteurzoidberg provided.

@mnlj
Copy link

mnlj commented Aug 14, 2019

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.

@alexander-akait
Copy link
Member

@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 webpack-dev-server@3.8.0 we start to check when you use array, so problem appears

@docteurzoidberg
Copy link
Author

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.

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

@alexander-akait
Copy link
Member

Anyway PR welcome 👍

@viruscamp
Copy link

viruscamp commented Aug 16, 2019

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']
})

@alexander-akait
Copy link
Member

Should be solved, just update deps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants