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

Fix path separator issue on Windows vs Linux #4

Merged
merged 2 commits into from
Oct 18, 2015

Conversation

dstj
Copy link
Contributor

@dstj dstj commented Oct 16, 2015

On Windows, the hardcoded / directory separator caused the following error. Using path.sep fixes the issue.

[17:43:42] Using gulpfile D:\Dev\testing\gulp-mock-server\gulpfile.js
[17:43:42] Starting 'mock'...
[17:43:42] Webserver started at http://localhost:8090
TypeError: Cannot call method 'split' of undefined
    at D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\src\mock.js:16:38
    at Array.map (native)
    at module.exports (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\src\mock.js:16:6)
    at call (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:239:7)
    at next (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:183:5)
    at D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect-query\index.js:8:5
    at call (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:239:7)
    at next (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:183:5)
    at jsonParser (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\body-parser\lib\types\json.js:100:40)
    at call (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:239:7)
TypeError: Cannot call method 'split' of undefined
    at D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\src\mock.js:16:38
    at Array.map (native)
    at module.exports (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\src\mock.js:16:6)
    at call (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:239:7)
    at next (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:183:5)
    at D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect-query\index.js:8:5
    at call (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:239:7)
    at next (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:183:5)
    at jsonParser (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\body-parser\lib\types\json.js:100:40)
    at call (D:\Dev\testing\gulp-mock-server\node_modules\gulp-mock-server\node_modules\connect\index.js:239:7)

@dstj dstj closed this Oct 16, 2015
@dstj dstj reopened this Oct 16, 2015
@dstj
Copy link
Contributor Author

dstj commented Oct 16, 2015

No longer crashes on Windows, but does not support multi-level directory...

@dstj
Copy link
Contributor Author

dstj commented Oct 16, 2015

Directory nesting on Windows is fixed. Pull request has been updated.

sanyueyu added a commit that referenced this pull request Oct 18, 2015
thank you 亲爱的朋友
@sanyueyu sanyueyu merged commit 05c4a2d into sanyueyu:master Oct 18, 2015
sanyueyu added a commit that referenced this pull request Feb 22, 2017
thank you 亲爱的朋友
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants