denoland / deno

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

VScode plugin fails to resolve bare imports when in monorepo with a nested package.json #18287

Open rgripper opened 1 year ago

rgripper commented 1 year ago

I have a Vite+React+Typescript starter project that was created for npm and has a package.json file. I successfully run deno task dev on Deno 1.31.3, but VSCode shows errors for all bare imports in ts files. Note that it's a part of a monorepo and I have my structure like this:

monorepo/my-app/package.json monorepo/my-app/src/App.tsx

// App.tsx
import React, { useState } from 'react'; // <- 'Relative import path "react" not prefixed with / or ./ or ../deno(import-prefix-missing)'
dsherret commented 1 year ago

Mono repos are not yet supported.

RobertAKARobin commented 1 year ago

This occurs for me and my code isn't a monorepo.

dsherret commented 1 year ago

@RobertAKARobin I’d recommend opening a separate issue for that so it can be investigated. It may be a setup/configuration issue or some other unhandled scenario.

zingmane commented 1 year ago

Maybe it's the same problem described here? https://github.com/denoland/deno/issues/17930#issuecomment-1462434807