sntran/rclone.js

PostInstall script throwing error

Closed this issue · 5 comments

Hi there @sntran cool project ! The postinstall script seems to be throwing an error on npm install. I am using node v14.19.3. Please let me know if you need any more details to resolve this. I am planning to build a plugin for another application using this package.

> rclone.js@0.6.4 postinstall /home/atifcppprogrammer/Desktop/engineering/sandbox/rclonejs-fiddle/node_modules/rclone.js
> node bin/rclone.js selfupdate

Downloading rclone...
internal/streams/readable.js:657
  dest.on('unpipe', onunpipe);
       ^
TypeError: Cannot read property 'on' of undefined
    at ReadStream.Readable.pipe (internal/streams/readable.js:657:8)
    at Object.<anonymous> (/home/atifcppprogrammer/Desktop/engineering/sandbox/rclonejs-fiddle/node_modules/rclone.js/bin/rclone.js:35:15)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47
npm WARN rclonejs-fiddle@1.0.0 No description
npm WARN rclonejs-fiddle@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rclone.js@0.6.4 postinstall: `node bin/rclone.js selfupdate`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the rclone.js@0.6.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/atifcppprogrammer/.npm/_logs/2022-07-04T18_50_32_506Z-debug.log

I'm having the same exact error using both node v16.15.1 and node v16.14.2.

npm ERR! path <redacted>/node_modules/rclone.js
npm ERR! command failed
npm ERR! command sh -c node bin/rclone.js selfupdate
npm ERR! Downloading rclone...
npm ERR! node:internal/streams/readable:680
npm ERR!   dest.on('unpipe', onunpipe);
npm ERR!        ^
npm ERR! 
npm ERR! TypeError: Cannot read properties of undefined (reading 'on')
npm ERR!     at Socket.Readable.pipe (node:internal/streams/readable:680:8)
npm ERR!     at Object.<anonymous> (<redacted>/node_modules/rclone.js/bin/rclone.js:35:15)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1105:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47

I tried DEBUG=* npm install rclone.js but no additional information related to the problem was given.

Just found out, v0.5.0 and v0.6.0 install just fine.

v0.6.4 seems to be the culprit.

Hi all,

Sorry about that, it seemed that I had published v0.6.4 with non-commited changes.

I have published v0.6.6 with a fix. Would y'all mind trying that instead?

It's working for me. Thank you! 🎉

@sntran all good now thanks !