TypeError: Bad argument error occurred in code uploaded by node sdk.

  node.js, question
var qiniu = require('qiniu');
 var path = require('path');
 
 qiniu.conf.ACCESS_KEY = "...AK...";
 qiniu.conf.SECRET_KEY = "...SK...";
 
 var bucket = "test-bucket";
 var generatedToken = uptoken(bucket);
 var localFile = path.join(__dirname, "test.txt");
 var key =  new Date().getTime();
 var extra = new qiniu.io.PutExtra();
 
 qiniu.io.putFile(generatedToken, key, localFile, extra, function(err, ret) {
 if(!  err) {
 console.log(err);
 } else {
 console.log(ret);
 bracket
 });
 
 function uptoken(bucketName) {
 var putPolicy = new qiniu.rs.PutPolicy(bucketName);
 
 return putPolicy.token();
 bracket

Error reported:

buffer.js:194
 this.parent = new SlowBuffer(this.length);
 ^
 TypeError: Bad argument
 at new Buffer (buffer.js:194:21)
 at FormStream.field (E:\NodeJs\QiniuTest\node_modules\qiniu\node_modules\form
 stream\lib\formstream.js:135:16)
 at getMultipart (E:\NodeJs\QiniuTest\node_modules\qiniu\qiniu\io.js:60:10)
 at put (E:\NodeJs\QiniuTest\node_modules\qiniu\qiniu\io.js:45:14)
 at E:\NodeJs\QiniuTest\node_modules\qiniu\qiniu\io.js:96:5
 at fs.js:271:14
 at Object.oncomplete (fs.js:107:15)

1 ak, sk, bucket, file path, etc. have been checked to be correct;
At first, I thought it was the reason why the file was too large (a 10M-sized file generated by the program with random ascii characters that can be displayed), so I created a text document with only two sentences, and the result was the above prompt.
3 after checking, the program went wrong at qiniu.io.putFile step.
I found that the above error would not occur if the key was changed to another form (non-timestamp form).
Then came the problem and new mistakes:

error:
 { [RequestError: connect ECONNREFUSED]
 code: 'ECONNREFUSED',
 errno: 'ECONNREFUSED',
 syscall: 'connect',
 name: 'RequestError'
 bracket

It seems that the connection is incorrect, can you please provide the sdk version and test code?