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 issueI’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:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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