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

JSDoc task causes build to fail on windows #175

Closed
juongithub opened this issue May 23, 2017 · 5 comments
Closed

JSDoc task causes build to fail on windows #175

juongithub opened this issue May 23, 2017 · 5 comments

Comments

@juongithub
Copy link
Contributor

juongithub commented May 23, 2017

General information

  • SDK/Library version: unreleased (after 1.0.2)
  • OS: Windows 8.1 64-bit

Issue description

When I run 'npm run build' I see the errors:

[15:20:26] Using gulpfile [PATH]\braintree-web-drop-in\gulpfile.js

[15:20:26] Starting 'build'...
[15:20:26] Starting 'clean'...
[15:20:26] Finished 'clean' after 93 ms
[15:20:26] Starting 'build:js:unmin'...
[15:20:26] Starting 'build:js:min'...
[15:20:26] Starting 'build:css'...
[15:20:26] Starting 'build:demoapp'...
[15:20:26] Starting 'build:npm:statics'...
[15:20:26] Starting 'build:npm:package.json'...
[15:20:26] Starting 'build:npm:src'...
[15:20:26] Finished 'build:npm:package.json' after 66 ms
[15:20:27] Finished 'build:demoapp' after 670 ms
[15:20:27] Starting 'build:gh-pages'...
[15:20:27] Starting 'jsdoc:generate'...
The system cannot find the file specified.
[15:20:27] 'jsdoc:generate' errored after 59 ms
[15:20:27] Error: 1
    at formatError ([PATH]\braintree-web-drop-in\node_modules\gulp\bin\gulp.js:169:10)
    at Gulp.<anonymous> ([PATH]\braintree-web-drop-in\node_modules\gulp\bin\gulp.js:195:15)
    at emitOne (events.js:101:20)
    at Gulp.emit (events.js:188:7)
    at Gulp.Orchestrator._emitTaskDone ([PATH]\braintree-web-drop-in\node_modules\orchestrator\index.js:264:8)
    at [PATH]\braintree-web-drop-in\node_modules\orchestrator\index.js:275:23
    at finish ([PATH]\braintree-web-drop-in\node_modules\orchestrator\lib\runTask.js:21:8)
    at cb ([PATH]\braintree-web-drop-in\node_modules\orchestrator\lib\runTask.js:29:3)
    at ChildProcess.<anonymous> ([PATH]\braintree-web-drop-in\gulpfile.js:204:7)
    at emitTwo (events.js:106:13)
[15:20:27] 'build' errored after 921 ms
[15:20:27] Error in plugin 'run-sequence(jsdoc:generate)'
Error
    at finish ([PATH]\braintree-web-drop-in\node_modules\run-sequence\index.js:56:13)
    at Gulp.onError ([PATH]\braintree-web-drop-in\node_modules\run-sequence\index.js:67:4)
    at emitOne (events.js:101:20)
    at Gulp.emit (events.js:188:7)
    at Gulp.Orchestrator._emitTaskDone ([PATH]\braintree-web-drop-in\node_modules\orchestrator\index.js:264:8)
    at [PATH]\braintree-web-drop-in\node_modules\orchestrator\index.js:275:23
    at finish ([PATH]\braintree-web-drop-in\node_modules\orchestrator\lib\runTask.js:21:8)
    at cb ([PATH]\braintree-web-drop-in\node_modules\orchestrator\lib\runTask.js:29:3)
    at ChildProcess.<anonymous> ([PATH]\braintree-web-drop-in\gulpfile.js:204:7)
    at emitTwo (events.js:106:13)
[15:20:27] 'build:gh-pages' errored after 139 ms
[15:20:27] Error in plugin 'run-sequence(build)'
Error
    at finish ([PATH]\braintree-web-drop-in\node_modules\run-sequence\index.js:56:13)
    at Gulp.onError ([PATH]\braintree-web-drop-in\node_modules\run-sequence\index.js:67:4)
    at emitOne (events.js:101:20)
    at Gulp.emit (events.js:188:7)
    at Gulp.Orchestrator._emitTaskDone ([PATH]\braintree-web-drop-in\node_modules\orchestrator\index.js:264:8)
    at [PATH]\braintree-web-drop-in\node_modules\orchestrator\index.js:275:23
    at finish ([PATH]\braintree-web-drop-in\node_modules\orchestrator\lib\runTask.js:21:8)
    at cb ([PATH]\braintree-web-drop-in\node_modules\orchestrator\lib\runTask.js:29:3)
    at finish ([PATH]\braintree-web-drop-in\node_modules\run-sequence\index.js:60:5)
    at Gulp.onError ([PATH]\braintree-web-drop-in\node_modules\run-sequence\index.js:67:4)
[15:20:27] 'build:gh-pages' errored after 203 ms
[15:20:27] Error in plugin 'run-sequence(jsdoc:generate)'
Error
    at finish ([PATH]\braintree-web-drop-in\node_modules\run-sequence\index.js:56:13)
    at Gulp.onError ([PATH]\braintree-web-drop-in\node_modules\run-sequence\index.js:67:4)
    at emitOne (events.js:101:20)
    at Gulp.emit (events.js:188:7)
    at Gulp.Orchestrator._emitTaskDone ([PATH]\braintree-web-drop-in\node_modules\orchestrator\index.js:264:8)
    at [PATH]\braintree-web-drop-in\node_modules\orchestrator\index.js:275:23
    at finish ([PATH]\braintree-web-drop-in\node_modules\orchestrator\lib\runTask.js:21:8)
    at cb ([PATH]\braintree-web-drop-in\node_modules\orchestrator\lib\runTask.js:29:3)
    at ChildProcess.<anonymous> ([PATH]\braintree-web-drop-in\gulpfile.js:204:7)
    at emitTwo (events.js:106:13)

if I comment the following code in gulpfile.js:

gulp.task('jsdoc:generate', function (done) {
  jsdoc({
    configure: 'jsdoc/conf.json',
    destination: config.dist.jsdoc + VERSION,
    recurse: true,
    readme: config.jsdoc.readme,
    template: 'node_modules/jsdoc-template'
  }, done);
});

everything works fine.

@crookedneighbor
Copy link
Contributor

It's possible that the jsdoc module doesn't play nice with a windows system. I'll look into this.

@juongithub
Copy link
Contributor Author

however, the build was ok in one of the previous versions.

@crookedneighbor crookedneighbor changed the title "The system cannot find the file specified." while building JSDoc task causes build to fail on windows May 23, 2017
@juongithub
Copy link
Contributor Author

The root cause of this error is:

function _replaceVersionInFile(filename) {
    return `<(sed -e 's/@VERSION/${VERSION}/g' '${filename}')`;
}

since 'sed' is not available on Windows.

@juongithub
Copy link
Contributor Author

Here is the pull request: #176

@crookedneighbor
Copy link
Contributor

Closed with #179

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

No branches or pull requests

2 participants