angular-jsdoc icon indicating copy to clipboard operation
angular-jsdoc copied to clipboard

Publish fails with Node 8.9.1

Open xenobytezero opened this issue 6 years ago • 1 comments

Our documentation build has started failing after a Node update (windows) to 8.9.1 from an old 6.x release.

fs.js:1910
  binding.copyFile(src, dest, flags);
          ^

Error: EPERM: operation not permitted, copyfile 'C:\Projects\app\client\node_modules\angular-jsdoc\angular-template\css\prettify-tomorrow.css' -> 'C:\Projects\app\Documentation\Client\JavaScript\css'
    at Object.fs.copyFileSync (fs.js:1910:11)
    at C:\Projects\app\client\node_modules\angular-jsdoc\angular-template\publish.js:85:10
    at Array.forEach (<anonymous>)
    at C:\Projects\app\client\node_modules\angular-jsdoc\angular-template\publish.js:82:17
    at Array.forEach (<anonymous>)
    at copyStaticFiles (C:\Projects\app\client\node_modules\angular-jsdoc\angular-template\publish.js:78:17)
    at Object.exports.publish (C:\Projects\app\client\node_modules\angular-jsdoc\angular-template\publish.js:300:3)
    at Object.module.exports.cli.generateDocs (C:\Projects\app\client\node_modules\jsdoc\cli.js:448:35)
    at Object.module.exports.cli.processParseResults (C:\Projects\app\client\node_modules\jsdoc\cli.js:399:20)
    at module.exports.cli.main (C:\Projects\app\client\node_modules\jsdoc\cli.js:240:14)
    at Object.module.exports.cli.runCommand (C:\Projects\app\client\node_modules\jsdoc\cli.js:189:5)
    at C:\Projects\app\client\node_modules\jsdoc\jsdoc.js:105:9
    at Object.<anonymous> (C:\Projects\app\client\node_modules\jsdoc\jsdoc.js:106:3)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)

Looking at documentation, fs.copyFileSync was added to the official fs module in 8.5.0, which I assume is overriding the fs.copyFileSync from jsdoc that is being used in publish.js

The official fs.copyFileSync does not allow a folder as the dest parameter, and will fail as a EPERM.

xenobytezero avatar Nov 22 '17 11:11 xenobytezero

Main jsdoc had this issue and it was fixed in version 3.5.5 See https://github.com/jsdoc3/jsdoc/issues/1438

nomaed avatar Nov 23 '17 15:11 nomaed