megahertz / electron-simple-publisher

Simple way to publish releases for electron-simple-updater
MIT License
66 stars 25 forks source link

Error : Cannot read property 'endsWith' of undefined #15

Closed abalad closed 7 years ago

abalad commented 7 years ago

When sending the files Via Amazon S3, when the last file is sent, the following error is generated:

Cannot read property 'endsWith' of undefined

I am using the following command: node_modules/.bin/publish --path ./artifacts/installers/packaged/

megahertz commented 7 years ago

Could you please run this command with --debug flag?

abalad commented 7 years ago

Log: 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'el:publish', 1 verbose cli '--', 1 verbose cli '--path', 1 verbose cli './artifacts/installers/packaged/', 1 verbose cli '--debug' ] 2 info using npm@4.2.0 3 info using node@v7.8.0 4 verbose run-script [ 'preel:publish', 'el:publish', 'postel:publish' ] 5 info lifecycle medicsolution@0.0.2~preel:publish: medicsolution@0.0.2 6 silly lifecycle medicsolution@0.0.2~preel:publish: no script for preel:publish, continuing 7 info lifecycle medicsolution@0.0.2~el:publish: medicsolution@0.0.2 8 verbose lifecycle medicsolution@0.0.2~el:publish: unsafe-perm in lifecycle true 9 verbose lifecycle medicsolution@0.0.2~el:publish: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\Maicon\Documents\Sistemas\MedicSolution\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Users\Maicon\AppData\Roaming\npm\node_modules\angular-cli\bin;C:\Program Files\nodejs\;C:\Ruby23-x64\bin;C:\Users\Maicon\AppData\Roaming\npm\node_modules\angular-cli\bin;C:\Users\Maicon\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Maicon\AppData\Roaming\npm 10 verbose lifecycle medicsolution@0.0.2~el:publish: CWD: C:\Users\Maicon\Documents\Sistemas\MedicSolution 11 silly lifecycle medicsolution@0.0.2~el:publish: Args: [ '/d /s /c', 11 silly lifecycle 'publish "--path" "./artifacts/installers/packaged/" "--debug"' ] 12 silly lifecycle medicsolution@0.0.2~el:publish: Returned: code: 1 signal: null 13 info lifecycle medicsolution@0.0.2~el:publish: Failed to exec el:publish script 14 verbose stack Error: medicsolution@0.0.2 el:publish:publish "--path" "./artifacts/installers/packaged/" "--debug" 14 verbose stack Exit status 1 14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:279:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:194:7) 14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:194:7) 14 verbose stack at maybeClose (internal/child_process.js:899:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 15 verbose pkgid medicsolution@0.0.2 16 verbose cwd C:\Users\Maicon\Documents\Sistemas\MedicSolution 17 error Windows_NT 10.0.14393 18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "el:publish" "--" "--path" "./artifacts/installers/packaged/" "--debug" 19 error node v7.8.0 20 error npm v4.2.0 21 error code ELIFECYCLE 22 error errno 1 23 error medicsolution@0.0.2 el:publish:publish "--path" "./artifacts/installers/packaged/" "--debug" 23 error Exit status 1 24 error Failed at the medicsolution@0.0.2 el:publish script 'publish "--path" "./artifacts/installers/packaged/" "--debug"'. 24 error Make sure you have the latest version of node.js and npm installed. 24 error If you do, this is most likely a problem with the medicsolution package, 24 error not with npm itself. 24 error Tell the author that this fails on your system: 24 error publish "--path" "./artifacts/installers/packaged/" "--debug" 24 error You can get information on how to open an issue for this project with: 24 error npm bugs medicsolution 24 error Or if that isn't available, you can get their info via: 24 error npm owner ls medicsolution 24 error There is likely additional logging output above. 25 verbose exit [ 1, true ]

abalad commented 7 years ago

Console Log: TypeError: Cannot read property 'endsWith' of undefined at S3Transport.getUpdatesJsonUrl (C:\Users\Maicon\Documents\Sistemas\MedicSolution\node_modules\electron-simple-publisher\lib\transport\abstract.js:186:12) at Promise (C:\Users\Maicon\Documents\Sistemas\MedicSolution\node_modules\electron-simple-publisher\lib\transport\abstract.js:131:21) at S3Transport.fetchUpdatesJson (C:\Users\Maicon\Documents\Sistemas\MedicSolution\node_modules\electron-simple-publisher\lib\transport\abstract.js:130:12) at S3Transport.updateUpdatesJson (C:\Users\Maicon\Documents\Sistemas\MedicSolution\node_modules\electron-simple-publisher\lib\transport\abstract.js:162:17) at transport.beforeUpload.then.then.then (C:\Users\Maicon\Documents\Sistemas\MedicSolution\node_modules\electron-simple-publisher\lib\commands\publish.js:38:24) at process._tickDomainCallback (internal/process/next_tick.js:135:7)

megahertz commented 7 years ago

Try the latest version

abalad commented 7 years ago

Tanks @megahertz : All releases have been successfully published ;)

Note: But I had to set the package.updater.url in package.json main

megahertz commented 7 years ago

You're welcome!