No Message String warnings

30 views
Skip to first unread message

Usaid Khan

unread,
May 16, 2023, 4:49:26 AM5/16/23
to Blockly
Hello,

I am getting No Message String warnings on console which are affecting my code.
I am getting this error on my production side but not on local environment. 
I am using React with typescript and my Blockly version is 9.3.2.
I am using  IMPORT modules method rather than <script> tags.
Here is my code

import En from 'blockly/msg/en.js';
import Blockly from 'blockly'
import 'blockly/javascript_compressed';
import { INITIAL_TOOLBOX_JSON } from './toolBoxCategory';

export const BlocklyWorkspace: FC<any> = () => {
const [workspace, setWorkspace] = useState<any>(null);

    useEffect(() => {
Blockly.setLocale(En)
            let blocklyWorkspace = Blockly.inject("blocklyDiv", {
                toolbox: INITIAL_TOOLBOX_JSON,
                trashcan: true,
                move: {
                    scrollbars: {
                        horizontal: true,
                        vertical: true
                    },
                    drag: true,
                    wheel: true
                },
                zoom:
                {
                    controls: true,
                    wheel: true,
                    startScale: 1.0,
                    maxScale: 3,
                    minScale: 0.3,
                    scaleSpeed: 1.2,
                    pinch: true
                },

            });
            setWorkspace(blocklyWorkspace)
},[]);
  return (
  <div id="blocklyDiv"></div>
) }

blocklyIssue.PNG


I am importing language file but still getting the message warnings. 

Any help would be appreciated.
 

Beka Westberg

unread,
May 16, 2023, 11:43:31 AM5/16/23
to blo...@googlegroups.com
Hmm, well it looks like you're setting it up correctly!

Have you tried checking out our react sample and seeing if you could customize from that?

Otherwise, could you provide a minimal repo that reproduces this case? If we can play around with the code that would be very helpful for debugging!

Sorry I can't be of more immediate help, but hopefully the react sample gives you some place to start! If you have any further questions please reply =)
--Beka

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/a07da115-0dde-4bc2-bcb9-dfe8850d44cbn%40googlegroups.com.

Usaid Khan

unread,
Jun 9, 2023, 5:15:40 AM6/9/23
to Blockly
Thank you, I have resolved this issue by creating a fresh app with latest versions of every module. 
Reply all
Reply to author
Forward
0 new messages