Forum Discussion
Hello everyone,
I spent a good amount of hours trying to make this work, like, really, A LOT. It always threw some issues at me, whether it's the windows-build-tools or the python version.
Later I've found out the lithium-sdk requires Python v2x and Node v => 4.8.4, 6.11.2 and 8.3.0. I also tried installing those versions manually too.
At the end, managed to make it work in very little time by using Docker.
1. This is the docker file I went with:
FROM node:8.3.0
WORKDIR /app
RUN apt-get update
RUN apt-get install -y git rsync
RUN npm install gulp-cli -g
RUN npm install lithium-sdk
CMD /bin/bash
2. Save that as dockerfile without any extension.
3. Open the command and navigate to the folder where the dockerfile was saved and run
docker build -t lithium .
You can rename lithium to whatever you like.
5. Run the docker build
docker run -it --rm lithium
lithium is the name you added on the previous step
When everything finishes, in my case, the li command was saying it's not found so I had to run npm install lithium-sdk -g --force to make it work.
5. I saved that as a docker image to avoid having to run the same command again next time
- docker ps to list all
- docker commit $name (from docker ps) $new_name (your new name) - Example: docker commit lithium initial
That's it. After all that, I was able to work normally with the li command.
To connect the container with your Visual Studio Code, you can check this article.
Hopefully this can be helpful to someone out there 🙂
Related Content
- 7 years ago