Skip to content

"The CJS build of Vite's Node API is deprecated" warning message #150

@DIPANJAN01

Description

@DIPANJAN01

Describe the bug

When I install a solidjs project with Vite using npx degit solidjs/templates/js my-project (as the official docs suggest for installing a solidjs project with Vite), and then do npm run dev, I get this warning in the console:

The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

It seems to go away when I manually change the extension of vite.config.js to vite.config.mjs

Your Example Website or App

https://github.com/DIPANJAN01/solid-my-app.git

Steps to Reproduce the Bug or Issue

  1. npx degit solidjs/templates/js my-app
  2. cd my-app
  3. npm i
  4. npm run dev
  5. Observe the terminal

Expected behavior

Expected behavior: No warning in the console when the app is run with npm run dev

Screenshots or Videos

No response

Platform

  • OS: Linux (Ubuntu 24.04.1 LTS)
  • Editor: VSCode (1.93.1)
  • Solidjs version: 1.8.11

Additional context

Yes maybe its not a "bug" bug, but its still an annoying warning and just wanted to let you know about it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions