Open kchadha opened 6 years ago
Updates: the second warning listed above is created regardless of whether a scalar variable or list is being created, and after talking to @fsih, it seems that these warnings (or at least the one about the OrderedMap) have been around for a while, and were not created because of https://github.com/LLK/scratch-blocks/pull/1350.
the second warning。
Version of "immutable" package in scratch-gui is "3.8.2", while version of "immutable" is "3.8.1" in “scratch-vm” package.
Monitors data is parsed by vm.loadProject
which use "OrderedMap" of "3.8.1".
while in monitor-list.jsx
monitors: PropTypes.instanceOf(OrderedMap),
use "OrderedMap" of "3.8.2". They are not the same "OrderedMap", monitors instanceof OrderedMap
will returnfalse
.
how to fix? make sure that version of immutable in scratch-ui/package.json and scratch-vm/package.json are equal. we can change scratch-gui/package.json:
"immutable": "3.8.1",
Creating a new variable or list (with the variables by id work in scratch-blocks) issues the following warnings (respectively) in the console. These are non-fatal.
raven.js:55 Warning: Failed prop type: Invalid prop `value` of type `number` supplied to `MonitorComponent`, expected `string`.
raven.js:55 Warning: Failed prop type: Invalid prop `monitors` of type `OrderedMap` supplied to `MonitorList`, expected instance of `OrderedMap`.
I assume this is coming from the last line of the following block of code in monitor.jsx: