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

Paths with spaces aren't supported #84

Closed
coryhouse opened this issue May 31, 2016 · 15 comments · Fixed by #86
Closed

Paths with spaces aren't supported #84

coryhouse opened this issue May 31, 2016 · 15 comments · Fixed by #86

Comments

@coryhouse
Copy link

On Windows, if you try running eslint-watch in a path that contains spaces in the name, it will fail to parse the path properly.

Example: coryhouse/react-slingshot#150

@rizowski
Copy link
Owner

rizowski commented May 31, 2016

@coryhouse @alvipeo can I get the DEBUG output for the issue?
set DEBUG=esw:* & esw webpack.config.* src tools

@coryhouse
Copy link
Author

Sure thing!

C:\Users\chouse\Documents\Visual Studio 2005\react-slingshot>npm run lint

react-slingshot@4.0.0 lint C:\Users\chouse\Documents\Visual Studio 2005\react-slingshot
set DEBUG=esw:* && esw webpack.config.* src tools

esw:eslint-cli Loaded +0ms
esw:eslint-cli EsLint path: C:\Users\chouse\Documents\Visual Studio 2005\react-slingshot\node_modules.bin\eslint.cmd +3ms
esw:eslint-help Loaded +37ms
esw:options Loaded +30ms
esw:success-formatter loaded +295ms
esw:simple-detail loaded +5ms
esw:watcher Loaded +1ms
esw:arg-parser Loaded +2ms
esw:esw-cli Loaded +0ms
esw:esw-cli Eslint-Watch: 2.1.11 +1ms
esw:eslint-help Executing help +0ms
esw:eslint-cli eslint: [ '--help' ] +1ms
esw:eslint-help Help text received +568ms
esw:eslint-help Alias found: -c +2ms
esw:eslint-help Parsing --config +1ms
esw:eslint-help Parsing --no-eslintrc +1ms
esw:eslint-help Parsing no option +0ms --no-eslintrc
esw:eslint-help Parsing --env +1ms
esw:eslint-help Parsing --ext +0ms
esw:eslint-help Parsing --global +1ms
esw:eslint-help Parsing --parser +0ms
esw:eslint-help Parsing --parser-options +1ms
esw:eslint-help Parsing --cache +0ms
esw:eslint-help Parsing --cache-file +1ms
esw:eslint-help Parsing --cache-location +1ms
esw:eslint-help Parsing --rulesdir +0ms
esw:eslint-help Parsing --plugin +0ms
esw:eslint-help Parsing --rule +1ms
esw:eslint-help Parsing --ignore-path +0ms
esw:eslint-help Parsing --no-ignore +1ms
esw:eslint-help Parsing no option +0ms --no-ignore
esw:eslint-help Parsing --ignore-pattern +1ms
esw:eslint-help Parsing --stdin +0ms
esw:eslint-help Parsing --stdin-filename +1ms
esw:eslint-help Parsing --quiet +0ms
esw:eslint-help Parsing --max-warnings +1ms
esw:eslint-help Alias found: -o +0ms
esw:eslint-help Parsing --output-file +1ms
esw:eslint-help Alias found: -f +0ms
esw:eslint-help Parsing --format +1ms
esw:eslint-help Parsing --init +1ms
esw:eslint-help Parsing --fix +0ms
esw:eslint-help Parsing --debug +0ms
esw:eslint-help Alias found: -h +1ms
esw:eslint-help Parsing --help +0ms
esw:eslint-help Alias found: -v +1ms
esw:eslint-help Parsing --version +1ms
esw:eslint-help Parsing --no-inline-config +0ms
esw:eslint-help Parsing no option +1ms --no-inline-config
esw:eslint-help Parsing --print-config +0ms
esw:esw-cli Arguments passed: [ 'C:\Program Files (x86)\nodejs\node.exe', 'C:\Users\chouse\Documents\Visual Studio 2005\react-slingshot\nod
e_modules\eslint-watch\bin\esw', 'webpack.config.', 'src', 'tools' ] +6ms
esw:esw-cli Parsing args +4ms
esw:arg-parser Directories to check: [ 'webpack.config.
', 'src', 'tools' ] +0ms
esw:arg-parser Args [ 'webpack.config.', 'src', 'tools' ] +1ms
esw:arg-parser Pushing item: webpack.config.
+1ms
esw:arg-parser Pushing item: src +0ms
esw:arg-parser Pushing item: tools +1ms
esw:arg-parser setting custom formatter +0ms
esw:arg-parser GetPath: simple-detail +1ms
esw:esw-cli Running initial lint +0ms
esw:esw-cli [ 'webpack.config.', 'src', 'tools', '-f', 'C:\Users\chouse\Documents\Visual Studio 2005\react-slingshot\node_modules\eslint-wat
ch\src\formatters\simple-detail' ] +1ms
esw:eslint-cli eslint: [ 'webpack.config.
', 'src', 'tools', '-f', 'C:\Users\chouse\Documents\Visual Studio 2005\react-slingshot\node_modules
\eslint-watch\src\formatters\simple-detail' ] +1ms
esw:eslint-cli 0 +10ms
'C:\Users\chouse\Documents\Visual' is not recognized as an internal or external command,
operable program or batch file.
esw:esw-cli exitCode: 1 +38ms

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "lint"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! react-slingshot@4.0.0 lint: set DEBUG=esw:* && esw webpack.config.* src tools
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-slingshot@4.0.0 lint script 'set DEBUG=esw:* && esw webpack.config.* src tools'.
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 react-slingshot package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! set DEBUG=esw:* && esw webpack.config.* src tools
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-slingshot
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls react-slingshot
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\chouse\Documents\Visual Studio 2005\react-slingshot\npm-debug.log

@rizowski
Copy link
Owner

Thank you. Can I also get the eslint version you are using. Looks like I am not able to reproduce it.

@coryhouse
Copy link
Author

I'm running eslint 2.9.0. Though I just upgraded to 2.11.1 and it continues to occur. I've confirmed that moving to a directory without spaces resolves the issue.

This line showed me that the space was the issue:

'C:\Users\chouse\Documents\Visual' is not recognized as an internal or external command,
operable program or batch file.

@coryhouse
Copy link
Author

coryhouse commented May 31, 2016

I've also confirmed this occurs on Windows 7 and 10.

@rizowski
Copy link
Owner

Got it to throw, thank you.

@rizowski rizowski added the bug label May 31, 2016
@rizowski
Copy link
Owner

It looks like this is going to take a little more work than I initially thought.

@coryhouse
Copy link
Author

Thanks for giving it a look! I'm really enjoying eslint-watch in the meantime. I also used it in my Pluralsight course which has already been viewed by 1000's in the last week, so your work is getting a lot of use! 👍

@rizowski
Copy link
Owner

Glad it is of use to you! I also appreciate the promo! I will keep you posted on the progress of the issue.

@coryhouse
Copy link
Author

Hi @rizowski - Any update? I've had quite a few Windows users get bitten by this. The good news is my Pluralsight course and React Slingshot are both getting a lot of traffic so you should be seeing a lot of downloads. :)

@rizowski
Copy link
Owner

Hey @coryhouse Sorry for the delay. I have messed around with a couple of ideas trying to fix the issue. One of the most common ways to solve the issue is to escape the spaces in the path. I haven't been able to get that to work on windows however. 😞 Let me mess around with this a bit more. I have a little bit of time today that I can work on it. Do you have any suggestions that I could try?

@coryhouse
Copy link
Author

While I'm strong in JS, I'm still a noob in creating npm packages. But the other popular npm packages I'm using with React Slingshot are able to handle paths with spaces. For example, Webpack, Babel, and Mocha. I suspect they're using an npm package that handles path issues for them. Perhaps using the same abstraction would take this issue off your hands altogether?

rizowski added a commit that referenced this issue Jun 22, 2016
@rizowski
Copy link
Owner

@coryhouse I was able to figure out a fix; at least on my machine. 😌 Took a bit of work, but I think it should help with future problems. Can you or anyone that has been experiencing this problem test out the version that is on the branch path-fix for me? If that can be verified I will push out the fix.

@rizowski rizowski self-assigned this Jun 22, 2016
rizowski added a commit that referenced this issue Jun 30, 2016
* Trying a normalizer function

* Adding appveyor and getting almost all tests to pass

* Fixing #84

* Updating readme

* Adding donation link since this project is starting to take a significant amount of my time
@coryhouse
Copy link
Author

Just FYI - the new release you just published isn't marked as latest yet in Github.

@rizowski
Copy link
Owner

@coryhouse it should be now.

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.

2 participants