i have a small problem. I am trying to use upickle lib. i have included it in my sharedDependencies as "com.lihaoyi" %%% "upickle" % "0.3.6". For some reason i am able to import upickle in my server project but it is still not available in my client project. I am trying to understand what is it i am doing wrong. I am following scala-react-spa tutorial here
Asked
Active
Viewed 285 times
2
-
What do you mean by "it is not available", exactly? What is the error message and where does it come from? – sjrd Dec 11 '15 at 12:42
-
Sorry for late reply. I was offline for few days.By not available i meant i was not able to import lib. Idea just gave me `Compilation error[not found: object upickle]` I just imported new project from existing sources and it worked for me. It must some issue related to indexing in Intellij-idea. – Dec 14 '15 at 07:28
-
@ShubhamKamthania Could you post an answer here yourself and clarify that having it in the shared project is the correct answer? I think you can accept your own answer as well. Just to make it easier for future readers. – Per Wiklander Feb 10 '16 at 20:34
2 Answers
1
Forgot to answer this question. This is a problem related to indexing intellij-idea. Many a times idea just fail to index properly or fails to import sbt project. So two options that can possibly works is to go to file > invalidate cache and restart or import the project again as mention here. Sorry for chipping in late for this one.
Edit 1
Here is more details from the above link to add more description to the answer
On the right-hand side of your IntelliJ window, you will see a list of vertical tabs, open the SBT tab.
Select the module that's causing trouble, right click on it, select "Detach external project"
Try to import the module again.

Community
- 1
- 1
-
Try to put more description in answer rather than linking to another question. – Raju Apr 09 '16 at 02:20
0
Please take a look at example build.sbt with upickle. You don't need upickle in shared project. Instead you need it in server as
"com.lihaoyi" %% "upickle" % <latestVersion>
and in client as
"com.lihaoyi" %%% "upickle" % <latestVersion>
Make sure you used 2 percent signs in server and 3 in client.

Oleg Rudenko
- 708
- 4
- 12
-
According to OP, having it in the shared project actually worked (after an IDE reindex). That's what I'm doing myself as well. – Per Wiklander Feb 10 '16 at 20:33