import not found error for sbt.build file

1.1k views Asked by At

I am in the learning process for Scala and sbt. I have an existing project I am starting with.

On the command line under top project folder, as soon as I enter the sbt command I get:

C:\Projects\aproject\build.sbt:1: error: not found: object scalariform

import scalariform.formatter.preferences._

C:\Projects\aProject\build.sbt:2: error: object sbt is not a member of package com.typesafe

import com.typesafe.sbt.SbtScalariform

I can't find an online reference for this specific error. I assume the second error is because of the first error.

The sbt.build file has these three imports:

import scalariform.formatter.preferences._

import com.typesafe.sbt.SbtScalariform

import com.typesafe.sbt.SbtScalariform.ScalariformKeys

I have scala version 2.13.0 and sbt version 1.2.8

1

There are 1 answers

2
Dmytro Mitin On

Add to project/plugins.sbt

addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.3")

and refresh the project.

https://github.com/sbt/sbt-scalariform