DenoDDeno
Powered by
OmegaPiratO
Denoβ€’3y agoβ€’
17 replies
OmegaPirat

External dependencies with npm specifier in combination with vite does not work.

Hi,
I am new to Deno and want to build an app with deno, vite and react. Unfortunately the dependencies are not resolved correctly. It says:
The following dependencies are imported but could not be resolved:
  npm:react (imported by.....)
  npm:react-dom/client (imported by ...)
  npm:styled-components (imported by...)
  npm:vite@^4.3.9 (imported by ...)
  npm:@vitejs/plugin-react@^4.0.0
The following dependencies are imported but could not be resolved:
  npm:react (imported by.....)
  npm:react-dom/client (imported by ...)
  npm:styled-components (imported by...)
  npm:vite@^4.3.9 (imported by ...)
  npm:@vitejs/plugin-react@^4.0.0



I added my vite.config.mts and my deps.ts to the attachment. I start the app with the command
deno run -A npm:vite
deno run -A npm:vite

My deno version is
1.36.1
1.36.1

Do you need any further information?

I am pretty desperated and thanks in advance πŸ™‚
vite.config.mts454B
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Relative path in `npm:` specifier
abiAabi / help
3y ago
npm specifier import types
andykaisAandykais / help
4y ago