From b3564c9434a025acde4bd3e213e3a73d56e4b810 Mon Sep 17 00:00:00 2001
From: Alice Poggioli <alice.poggioli@paca.happy-dev.fr>
Date: Tue, 25 Aug 2020 14:51:47 +0200
Subject: [PATCH] fix on tuto and add commons errors

---
 .../Developping-with-SibTemplateElement.rst   |  8 ++---
 .../How-to-make-components.rst                |  4 +--
 .../import_documentation/frequent-errors.rst  | 32 +++++++++++++++++++
 source/index.rst                              |  1 +
 4 files changed, 39 insertions(+), 6 deletions(-)
 create mode 100644 source/import_documentation/frequent-errors.rst

diff --git a/source/import_documentation/Developping-with-SibTemplateElement.rst b/source/import_documentation/Developping-with-SibTemplateElement.rst
index 0efffba..d611259 100644
--- a/source/import_documentation/Developping-with-SibTemplateElement.rst
+++ b/source/import_documentation/Developping-with-SibTemplateElement.rst
@@ -85,7 +85,7 @@ Pass your attributes to your template and write it.
             id="test"
         ></solid-display>
         `;
-        if(moderator) {
+        if(moderatorEmail) {
         tmpl += `
         <a href='mailto:p.${moderatorEmail}?subject=A%20new%20question%20for%20the%20FAQ&body=Hi!'>Your question question not here ?</a>
         `;
@@ -131,7 +131,7 @@ Here is the CSS used for the demo :
 
     /* /css/main.css */
     .accordion {
-        background-color: $second-color;
+        background-color: black;
         color : white;
         cursor: pointer;
         padding: 18px;
@@ -143,7 +143,7 @@ Here is the CSS used for the demo :
     }
 
     .active, .accordion:hover {
-        background-color: $primary-color;
+        background-color: blue;
     }
 
     .panel {
@@ -236,7 +236,7 @@ Put the component in your index.html
         <solid-faq
           data-src="./datas-faq.jsonLD"
           fields="question, answer"
-          moderator="alice@startinblox.com"
+          moderator-email="alice@startinblox.com"
           title="Super faq"
         >
         </solid-faq>
diff --git a/source/import_documentation/How-to-make-components.rst b/source/import_documentation/How-to-make-components.rst
index f67055e..9f63fb0 100644
--- a/source/import_documentation/How-to-make-components.rst
+++ b/source/import_documentation/How-to-make-components.rst
@@ -22,7 +22,7 @@ So, when you develop a new feature, think about who could use it. If it can be u
 Let's start 
 =============
 
-**Requirements** : Check if you have et least the version 6.14.5 of npm.
+**Requirements** : Check if you have et least the version 6.14.5 of npm with `npm -v`.
 
 1. Create a folder named "Solid-ComponentName"
 
@@ -46,7 +46,7 @@ Let's start
 
 .. code:: json
 
-    "serve": http-server
+    "serve": "http-server"
 
 Your `package.json` should look like this : 
 
diff --git a/source/import_documentation/frequent-errors.rst b/source/import_documentation/frequent-errors.rst
new file mode 100644
index 0000000..516105e
--- /dev/null
+++ b/source/import_documentation/frequent-errors.rst
@@ -0,0 +1,32 @@
+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';
+
+
+.. note:: 
+        Please, `help us to list frequent errors <https://git.startinblox.com/documentation/doc>`__ ! 
+
+        
\ No newline at end of file
diff --git a/source/index.rst b/source/index.rst
index c9f641b..fc865e9 100644
--- a/source/index.rst
+++ b/source/index.rst
@@ -22,6 +22,7 @@ Welcome to Startinblox's documentation!
    import_documentation/install-sib-server
    import_documentation/develop-sib-ldp-packages
    import_documentation/server-architecture
+   import_documentation/frequent-errors
 
 .. import_documentation/core-framework-architecture
 
-- 
GitLab