Skip to content
Snippets Groups Projects
Commit 74096926 authored by Guilhem Niot's avatar Guilhem Niot
Browse files

Add a note to fix npm permission errors

parent a07e5ada
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -91,7 +91,10 @@ It should be installed on both the client and the Raspberry Pi using ...@@ -91,7 +91,10 @@ It should be installed on both the client and the Raspberry Pi using
npm install -g dat-store npm install -g dat-store
\end{lstlisting} \end{lstlisting}
You should then configure a systemd service to run the store in background. The configuration on the user's device is \textbf{Note:} In case you have permission errors, you should NOT try running it with sudo. The correct solution is to fix the permissions of your npm installation. See the \href{https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally#manually-change-npms-default-directory}{manual guide}.
You should then configure a systemd service to run the store in background. The configuration on the user's device is done according to figure \ref{cmd:dat_store_systemd_user}. The configuration on the Raspberry Pi is achieved following figure \ref{cmd:dat_store_systemd_rasp}.
\begin{figure} \begin{figure}
\begin{lstlisting}[label=cmd:dat_store_systemd_user, caption=Configure dat-store systemd service on the user device] \begin{lstlisting}[label=cmd:dat_store_systemd_user, caption=Configure dat-store systemd service on the user device]
...@@ -121,8 +124,6 @@ sudo systemctl status dat-store ...@@ -121,8 +124,6 @@ sudo systemctl status dat-store
\end{lstlisting} \end{lstlisting}
\end{figure} \end{figure}
You should then configure a systemd service to run the store in background. The configuration on the user's device is done according to figure \ref{cmd:dat_store_systemd_user}. The configuration on the Raspberry Pi is achieved following figure \ref{cmd:dat_store_systemd_rasp}.
\begin{figure} \begin{figure}
\begin{lstlisting}[label=cmd:dat_store_systemd_rasp, caption=Configure dat-store systemd service on the raspberry pi] \begin{lstlisting}[label=cmd:dat_store_systemd_rasp, caption=Configure dat-store systemd service on the raspberry pi]
...@@ -168,15 +169,16 @@ We can then imagine the case where we have two clients A and B and one Raspberry ...@@ -168,15 +169,16 @@ We can then imagine the case where we have two clients A and B and one Raspberry
First, A executes the following commands: First, A executes the following commands:
\begin{lstlisting}[label=cmd:dat_store_example_A, caption=Commands executed by client A] \begin{lstlisting}[label=cmd:dat_store_example_A, caption=Commands executed by client A]
dat-store set-provider http://raspberry.local:3472 raspberry dat-store set-provider http://raspberrypi.local:3472 raspberry
mkdir mydat mkdir mydat
dat-store add ./mydat dat-store add ./mydat
dat-store add ./mydat raspberry dat-store add ./mydat raspberry
\end{lstlisting} \end{lstlisting}
Then, client B executes: Then, client B executes:
\begin{lstlisting}[label=cmd:dat_store_example_A, caption=Commands executed by client A] \begin{lstlisting}[label=cmd:dat_store_example_A, caption=Commands executed by client B]
dat-store set-provider http://raspberrypi.local:3472 raspberry
dat-store list raspberry dat-store list raspberry
dat-store clone ./mydat <url obtained from the previous command> dat-store clone ./mydat <url obtained from the previous command>
\end{lstlisting} \end{lstlisting}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment