denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
96.55k stars 5.33k forks source link

An import path cannot end with a '.ts' extension. Consider importing 'https://deno.land/x/abc/deps' instead. #5027

Closed slim-hmidi closed 4 years ago

slim-hmidi commented 4 years ago

I got tslint error when I import a file from deno like this:

import { path } from "https://deno.land/x/abc/deps.ts";

I installed Deno VSCode pulgin and restart and nothing changes. the only solution for it is just adding @ts-ignore to fix this. Any solution to fix that?

OS: Windows 10 VSCODE: 1.44.2 Deno: deno 0.41.0 v8 8.2.308 typescript 3.8.3

zhmushan commented 4 years ago

you should add the following in the settings of vscode

"deno.enable": true
slim-hmidi commented 4 years ago

@zhmushan I added it and restart VSCode and it does not work.

nayeemrmn commented 4 years ago

@slim-hmidi This is a https://github.com/axetroy/vscode-deno issue, doesn't belong here.

slim-hmidi commented 4 years ago

@nayeemrmn even without the VSCode plugin I have the same issue, is not a question of plugin.

nayeemrmn commented 4 years ago

Are you talking about VSCode warnings? The plugin is supposed to suppress that. It's obviously not a Deno issue.

ry commented 4 years ago

Sounds like an issue to report to tslint.

yayanbachtiar commented 4 years ago

you should add the following in the settings of vscode

"deno.enable": true

its work's thank you @zhmushan

ridhosatriawan commented 3 years ago

@yayanbachtiar its not working at me

lucacasonato commented 3 years ago

@ridhosatriawan Run deno: Init command from VS Code commands (press F1). Then restart VS Code.

tejasag commented 3 years ago

@ridhosatriawan Run deno: Init command from VS Code commands (press F1). Then restart VS Code.

Thanks a lot dude this solved my problem!

kitravee commented 3 years ago

@ridhosatriawan Run deno: Init command from VS Code commands (press F1). Then restart VS Code.

Thank you

Follow your step, and then it works image

khanakia commented 1 year ago

It's not working in mac already tried everyting