Skip to content

'settings' only refers to a type, but is being used as a value #176

Open

Description

@kerschfilip

Hi, I am trying to transfer a gitlab repository that contains only issues used to track project workflow and when running npm run start I get dozens of errors saying that 'settings' only refers to a type, but is being used as a value here.

For example:

26 if (settings.s3) {
       ~~~~~~~~
src/index.ts:28:18 - error TS2693: 'settings' only refers to a type, but is being used as a value here.

28     accessKeyId: settings.s3.accessKeyId,
                    ~~~~~~~~
src/index.ts:29:22 - error TS2693: 'settings' only refers to a type, but is being used as a value here.


I also had problem when I ran the script for the first time - I was getting the error "Cannot find module '../settings' or its corresponding type declarations." I kind of overcame that by changing one line in index.ts from
import settings from '../settings'; to import settings from './settings';

Any idea what I'm doing wrong? Thank you very much!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions