I am trying to import a package called Articles, which is a React JSX component, into a package called Core, which is another React component, but the one which runs using Vite.
The repo uses workspaces, and the Articles package has the name
@srp/web-articles
@srp/web-articles
. When i try to import it, React throws an error:
[plugin:vite:import-analysis] Failed to resolve import "@srp/web-articles" from "src/main.tsx". Does the file exist?/Users/danm/git/deno-srp-base/packages/web/core/src/main.tsx:6:215 | import { createRoot } from 'react-dom/client';6 | import { BrowserRouter, Routes, Route } from 'react-router-dom';7 | import Articles from '@srp/web-articles'; | ^8 | createRoot(document.getElementById('root')).render(/*#__PURE__*/ _jsxDEV(StrictMode, {9 | children: /*#__PURE__*/ _jsxDEV(BrowserRouter, {
[plugin:vite:import-analysis] Failed to resolve import "@srp/web-articles" from "src/main.tsx". Does the file exist?/Users/danm/git/deno-srp-base/packages/web/core/src/main.tsx:6:215 | import { createRoot } from 'react-dom/client';6 | import { BrowserRouter, Routes, Route } from 'react-router-dom';7 | import Articles from '@srp/web-articles'; | ^8 | createRoot(document.getElementById('root')).render(/*#__PURE__*/ _jsxDEV(StrictMode, {9 | children: /*#__PURE__*/ _jsxDEV(BrowserRouter, {
@srp/web-articles has the following in the deno.json