I do the tuto wakanda at new version and I have error code 4055 when I play js a method addSuperheroes.js. Please I need help.
Method:
ds.Superhero.remove();
new ds.Superhero({name:"Batman"}).save();
new ds.Superhero({name:"Superman"}).save();
var favoriteSuperhero = new ds.Superhero({name:"Wonder Woman"});
favoriteSuperhero.save();
ds.Superhero.all();
Error:
{
"__ERROR": [
{
"message": "Cannot read property 'remove' of undefined, line #1, file:///Users/arnaudthierard/Documents/Wakanda/solutions/HelloWorldWeb/back-end-superheroes/script/addSuperheroes.js.",
"componentSignature": "jvsc",
"errCode": 4055
},
{
"message": "Error evaluating javascript file:///Users/arnaudthierard/Documents/Wakanda/solutions/HelloWorldWeb/back-end-superheroes/script/addSuperheroes.js",
"componentSignature": "JS4D",
"errCode": 2
}
]
}
Make sure that the dataclass in the model is named Superhero.( not superhero or SuperHero ... )