question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSR Error when adding plugin

See original GitHub issue

Environment

  • Operating System: Linux
  • Node Version: v14.18.1
  • Nuxt Version: 3.0.0-27258467.4e424d0
  • Package Manager: yarn@1.22.17
  • Bundler: Vite
  • User Config: ssr, plugins
  • Runtime Modules: -
  • Build Modules: -

Describe the bug

Hello,

I’ve started a new project with Nuxt 3 and was trying to import the codemirror library as a plugin but I can’t get it to work. Is this a bug or am I doing something wrong?

The error is as follows: [vite] Internal server error: Failed to resolve import “~plugins/codemirror.js” from “virtual:D:\projects\code-editor.nuxt\plugins\client.mjs”. Does the file exist?

Reproduction

https://codesandbox.io/s/nostalgic-bell-du05c

Additional context

No response

Logs

ERROR  6:29:38 PM [vite] Internal server error: Failed to resolve import "~plugins/codemirror.js" from "virtual:/sandbox/.nuxt/plugins/client.mjs". Does the file exist?
  Plugin: vite:import-analysis
  File: virtual:/sandbox/.nuxt/plugins/client.mjs

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
danielroecommented, Nov 4, 2021

@selucaciu Track #646 - it’s not implemented yet in Nuxt 3.

2reactions
danielroecommented, Nov 3, 2021

Just name it codemirror.client.js. More info https://v3.nuxtjs.org/docs/directory-structure/plugins

Read more comments on GitHub >

github_iconTop Results From Across the Web

error with installing the SSL certificate. - WordPress.org
[This thread is closed.] Hello there, I hope you are doing well. Please, could you help me, I faced a problem with SSL...
Read more >
error message during SSR plugin 2011 install on a ... - VOX
Hi, I get an error message when I try to install the plugin on a specific server. I tried with a schedule from...
Read more >
Error ssl installing a Plugin | TrueNAS Community
Hi. I have a long time installation of Freenas. I replaced some HDs with more capacious ones. Everything OK. Then I tried installing...
Read more >
Error installing plugins for Jenkins 2.346.2 - Google Groups
Hi, I am running into errors installing plugins on a new Jenkins installation on Linux. # cat /etc/redhat-release. Red Hat Enterprise Linux Server...
Read more >
_error.page.js | vite-plugin-ssr
If we enable pre-rendering, then vite-plugin-ssr uses _error.page.js to generate dist/client/404.html . Most Static Hosts automatically pick up 404.html and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found