@Marina.Kan It’s deployed to model “default”
@Social_Smarttwigs, Let’s try the following. Please check the package.json file. What version of backendless-coderunner do you have there? Try to update to the latest version, which is 6.5.2. Will be waiting for you reply
Regards,
Marina
@Social_Smarttwigs Could we identify when the error started to appear? Did you make any changes to your code? And what character of these changes are?
I was first aware of the issue yesterday. I tried deploying the same code that was last published but the same error appears.
Hello @Social_Smarttwigs
Can you provide us with what the formData variable look like? Check before doing this, does it store personal data
Regards,
Viktor
The formData variable is part of the “backendless-coderunner” package.
Here’s an image of the output:
I’m not sure what could be causing this error as I can’t even deploy previous builds that were deployable. All I can assume is that the error lies within the “backendless-request” package that I stated before:
I just try to deploy a service with “npm run deploy”. Then I run into this error.
When I use “npm run debug” it works fine.
Hi @Eric_ten_Voorde ,
Sorry for delay with response.
Could you please provide value of “formData” variable as my colleague asked TC before? We need this value for better understanding of problem. Please check and blur before posting personal data if it present.
Regards, Andriy
formData is defined in the module backendless-coderunner as:
const formData = {
model: this.app.model || 'default',
code : {
value : modelZip,
options: {
filename : 'code',
contentType: 'application/zip'
}
}
}
The error seems to be trigger by modelZip being of type Buffer. As it is passed on it ultimately should be Blob as per:
https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules_typedoc_node_modules_typescript_lib_lib_dom_d_.formdata.html#append
we use in our BackendlessRequest the following FormData module https://www.npmjs.com/package/form-data and it supports using Streams and Buffers on the NodeJS env
Thanks @vladimir-upirov
The error disappears for me if I change a line of code in backendless-request/lib/index.js
var _FormData = module.exports.FormData;
into:
var _FormData = require(‘form-data’);
Not sure if this makes any sense. However it does seem to push the code now to backendless.
Hello guys,
we have an issue with deploying using node version 18.x.
An internal ticket has been created for this problem (BKNDLSS-29664).
As a workaround, you can use node v14x.
Regards
Is this problem still persisting? I am getting a similar error.
Hi, @Noah_Caldwell
The ticket has an open status, we will let you know when it is released.
Regards,
Marina
Any comments on Eric’s workaround of changing the underlying backendless-request package code? I need to deploy, can’t fall back to an old version of node, but don’t want to change something that might break a production app. Using require looks harmless, but I’d like to be sure. Thank you.
Hello @Kelly_Oglesby,
We can not guarantee that everything will work after manual changes in the library source code. But you may try it and see if it works for you too.
Soon we will release a new version of Coderunner with support for node v18, so this workaround will be not needed anymore.
We will notify everyone about this release here in this thread.
Did the new version for node 18+ ever happen? I just upgraded coderunner (it went up to 6.7.4, but this error is still occurring.
Thanks