1

I am looking to move my Wakanda application, created in Enterprise Studio v10, to Enterprise Studio/Server v11. I can start the solution successfully, but when I try to view my webapp in browsers, Wakanda Studio logs the error:

[Backend] Cannot read property 'replace' of undefined in undefined on line undefined

and the browser shows just a white page with some console errors (below).

Edit: commenting out all occurrences of .replace() does not solve the problem. I do not believe it is possible that this issue is the result of .replace() statements that I've written.

I do use string.replace() with regular expressions in a few places. The code works perfectly fine in v10 and am confused about what could be wrong.

Here is an example of how I am using replace() in the code:

var tempString = "";
tempString = tempEntity.sourceProjects;
tempString = tempString.replace(/,/g, " ");
tempString = tempString.replace(/other_/, "Other: ");

The code was more streamlined before- I broke it out into pieces in an attempt to get rid of the error, but no dice.

Browser with console errors: Browser errors

What I see when I click on "Loader.js: 2073"

loader.js:2073

4

2 回答 2

1

1)退出Wakanda
2)删除里面的旧index.package.json文件index.waPage
3)重启Wakanda,让Wakanda v11重新生成

于 2016-03-22T18:19:34.430 回答
0

您有错误:“无法读取未定义的属性 'replace'”,因为在第 2 行中,tempEntity 是一个空字符串,而您编写的是 tempEntity.sourceProjects。

tempEntity.sourceProjects 的值为“未定义”,因此当您尝试在第 3 行中使用替换时,您会收到此错误。

伊萨姆

于 2016-03-22T17:45:06.670 回答