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.

v1.10.0 BUG on vite dev server start (works fine with v1.9.0)

See original GitHub issue

It works fine with v1.9.0, BUT v1.10.0 throws this error:

error when starting dev server:
Error: Dynamic require of "fs" is not supported
    at file:///home/my-user/my-project/node_modules/vite-plugin-mkcert/dist/mkcert.mjs:13:9

My env info: npx envinfo --system --npmPackages vite,vite-plugin-mkcert --binaries

System:
    OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v16.16.0/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
  npmPackages:
    vite: ~3.1.3 => 3.1.3 
    vite-plugin-mkcert: 1.10.0 => 1.10.0 

vite.config.ts:

import { defineConfig } from 'vite';
import mkcert from 'vite-plugin-mkcert';

export default defineConfig({
  server: {
    https: true,
  },

  plugins: [mkcert()]
});

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
arunmmanoharancommented, Sep 26, 2022

I get a different error.

The “path” argument must be of type string or an instance of URL. Received undefined

image

3reactions
liuweiGLcommented, Sep 28, 2022

🎉 This issue has been resolved in version 1.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dev server fails to run on unmodified svelte-ts template #3834
Describe the bug The dev server fails to launch in a brand new Vite project (out of the box, no changes) when using...
Read more >
Troubleshooting - Vite
Vite cannot handle and does not support code that only runs on non-strict mode (sloppy mode). This is because Vite uses ESM and...
Read more >
Changelog - Cypress Documentation
This is fixed by doing a full reload for Vite, to ensure the spec re-runs correctly with the latest styles. Fixes #24874. The...
Read more >
npm - EPERM: operation not permitted on Windows
Today I got EPERM even in cmd.exe . But I ran the following command standing in C:\Program Files\nodejs , and it seems to...
Read more >
yarn create vite error | The AI Search Engine You Control
When you run the local vite dev server you may be prompted for your ... shell yarn create v1.22.11 [1/4] Resolving packages. ......
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