cocos2d / creator_to_cocos2dx

Creator plugin to support C++& Lua in cocos2d-x
235 stars 103 forks source link

TypeError: Cannot read property '0' of undefined #183

Open hamzamgit opened 5 years ago

hamzamgit commented 5 years ago

hi, i am getting this error while creating a build using this plugin

C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Utils.js:138 Uncaught TypeError: Cannot read property '0' of undefined at Object.get_font_path_by_uuid (C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Utils.js:138:73) at Label.parse_properties (C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Label.js:52:34) at Object.create_node (C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Utils.js:300:11) at Sprite.parse_child (C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Node.js:204:31) at Sprite. (C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Node.js:169:22) at Array.forEach (native) at Sprite.parse_children (C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Node.js:168:39) at Sprite.parse_properties (C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Node.js:152:14) at Sprite.parse_properties (C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Sprite.js:11:15) at Object.create_node (C:\cocos\NewProject\packages\creator-luacpp-support\core\parser\Utils.js:300:11)

solodon4 commented 5 years ago

I'm getting the same problem on MacOS. Any suggestions? It looks like the code is trying to open a font file or something, is it possible the font isn't available everywhere?

Uncaught TypeError: Cannot read property '0' of undefined
    at Object.get_font_path_by_uuid (/Users/solodon/Projects/Cocos/creator_to_cocos2dx/creator_project/packages/creator-luacpp-support/core/parser/Utils.js:138:73)
    at Label.parse_properties (/Users/solodon/Projects/Cocos/creator_to_cocos2dx/creator_project/packages/creator-luacpp-support/core/parser/Label.js:52:34)
    at Object.create_node (/Users/solodon/Projects/Cocos/creator_to_cocos2dx/creator_project/packages/creator-luacpp-support/core/parser/Utils.js:300:11)
    at Scene.parse_child (/Users/solodon/Projects/Cocos/creator_to_cocos2dx/creator_project/packages/creator-luacpp-support/core/parser/Node.js:204:31)
    at Scene.<anonymous> (/Users/solodon/Projects/Cocos/creator_to_cocos2dx/creator_project/packages/creator-luacpp-support/core/parser/Node.js:169:22)
    at Array.forEach (native)
    at Scene.parse_children (/Users/solodon/Projects/Cocos/creator_to_cocos2dx/creator_project/packages/creator-luacpp-support/core/parser/Node.js:168:39)
    at Scene.parse_properties (/Users/solodon/Projects/Cocos/creator_to_cocos2dx/creator_project/packages/creator-luacpp-support/core/parser/Node.js:152:14)
    at Scene.parse_properties (/Users/solodon/Projects/Cocos/creator_to_cocos2dx/creator_project/packages/creator-luacpp-support/core/parser/Scene.js:10:15)
    at state._json_data.forEach.obj (/Users/solodon/Projects/Cocos/creator_to_cocos2dx/creator_project/packages/creator-luacpp-support/core/parser/ConvertFireToJson.js:101:27)
gauravnba commented 4 years ago

Bump. Getting the same error. No apparent reason found yet.