Skip to content
Snippets Groups Projects
frequent-errors.rst 1.54 KiB
Newer Older
Frequent Errors

JSON problem
~~~~~~~~~~~~

.. code:: bash

    SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

**Resolution**: 
You can check your import in your component.

For example : 

.. code:: js

    import { store } from 'https://unpkg.com/@startinblox/core@0.11/dist/libs/store/store.js';

will make the error. 

To solve it, you should remplace by : 

.. code:: js

    import { store } from 'https://unpkg.com/@startinblox/core@0.11';

Alice Poggioli's avatar
Alice Poggioli committed
Multiple version loaded
~~~~~~~~~~~~~~~~~~~~~~~

Sometime you can see in your console different versions of the core loaded. This can cause you many trouble. 

This is because the core is imported into each component and each of them could have been written in a different version as your main application loads yet another one.

**Resolution**: 

Check the compatibility of the component you want to use with the version of the core you are working with. You should find this information in the documentation of the component. If it's not, you should mail the maintainer.

**Special note to maintainer**: 
If you're coding a component, do not forget :

    * to tell in its documentation with which version of the core it could be compatible
    * to let your email in the doc
    * to update your component when a new version is released
        
        This error should be prevent in other place ? You want to signal another goddam error ? 
        Please, `help us to improve this documentation <https://git.startinblox.com/documentation/doc>`__ :)