1

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
        }
    ]
}
Pratoux
  • 87
  • 8

1 Answers1

1

Make sure that the dataclass in the model is named Superhero.( not superhero or SuperHero ... )

issam Eljohri
  • 322
  • 1
  • 6
  • I have write "Superhero" : "classes": { "Superhero": { "panelColor": "#B7DDE8", "panel": { "isOpen": "true", "pathVisible": true, "position": { "X": 25, "Y": 20 } } }, "Movie": { "panelColor": "#E5B9B7", "panel": { "isOpen": "true", "pathVisible": true, "position": { "X": 349, "Y": 21 } } } }, – Pratoux Apr 11 '17 at 12:20
  • Anyone can help me ? – Pratoux Apr 11 '17 at 14:05
  • This same example worked for me, here is a screencast of what i have tried https://drive.google.com/file/d/0B1UZlfLCde0zSkc0T19kNHlja2c/view?usp=sharing i hope it will help – issam Eljohri Apr 11 '17 at 15:46
  • @Pratoux Can you tag the right answer to help others with the same issue ? – Yann Apr 12 '17 at 07:19