deno icon indicating copy to clipboard operation
deno copied to clipboard

VS Code: "Not prefixed with... and not in import map from ..."

Open jsb188 opened this issue 9 months ago • 0 comments

Version: Deno 1.14.3

Hello,

I have a VS code issue where import-map configured NPM packages are showing as errors. I saw a few threads like this but none of the threads I read solved my problem (even though the issues were very similar.

Here's an example:

On the Server Deno repo This will show as an error in VS Code ("not prefixed with / and not in import map from..."):

import { ApolloServer } from '@apollo/server';

This is my deno.json:

"imports": {
    "@apollo/server": "npm:@apollo/server@^4.10.4",
    "graphql": "npm:graphql@^16.8.1"
  }

However, this exact imports map works in my Fresh Deno app repo and VS Code does not complain.

jsb188 avatar May 15 '24 21:05 jsb188