question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.

See original GitHub issue

I’m getting following errors while trying to use deno-redis:

error: TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { BufReader, BufWriter } from "./vendor/https/deno.land/std/io/bufio.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/redis@v0.13.0/io.ts:2:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Connection } from "./connection.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/redis@v0.13.0/executor.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Connection } from "./connection.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/redis@v0.13.0/pubsub.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { ConditionalArray, Raw } from "./io.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/redis@v0.13.0/stream.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { RedisCommands } from "./command.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/redis@v0.13.0/redis.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import {
^
    at https://deno.land/x/redis@v0.13.0/redis.ts:4:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Connection } from "./connection.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/redis@v0.13.0/pipeline.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import {
^
    at https://deno.land/x/redis@v0.13.0/command.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { RedisPipeline } from "./pipeline.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/redis@v0.13.0/command.ts:10:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { RedisSubscription } from "./pubsub.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/redis@v0.13.0/command.ts:11:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import {
^
    at https://deno.land/x/redis@v0.13.0/command.ts:12:1

Found 11 errors.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
hkongcommented, Sep 29, 2020

Thanks @prcdpr !!

1reaction
prcdprcommented, Sep 28, 2020

Another workaround is copying whole deno-redis to your project and fixing imports by hand. But I would rather not stay like that

Read more comments on GitHub >

github_iconTop Results From Across the Web

This import is never used as a value and must use ... - GitHub
ts:8:1 - error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'....
Read more >
Typescript Import Problem after updating Deno - Stack Overflow
I recently update deno from v1.3.0 to v1.4.0. Before updating, my code doesn't have ...
Read more >
What is the point of importsNotUsedAsValues? What ... - Reddit
This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. But what is the...
Read more >
TypeScript 3.8 edge case type-only auto-import bug?
TS1371 : This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'. This...
Read more >
TSConfig Option: importsNotUsedAsValues - TypeScript
TSConfig. importsNotUsedAsValues ... How to provide a type shape to JavaScript objects. Narrowing. How TypeScript infers types based on runtime behavior.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found