Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] No known conditions for "./vite" specifier in "solid-devtools" package #252

Open
lakshbhutani opened this issue Jul 12, 2023 · 3 comments

Comments

@lakshbhutani
Copy link

lakshbhutani commented Jul 12, 2023

As soon as I import
import devtools from 'solid-devtools/vite';
in vite.config.js. I get the error
Using "solid-devtools": "^0.27.3",
and"solid-js": "^1.6.6",
I can't write type: module in package.json because it starts breaking the other code. Can anyone please help with the solution for this?

`✘ [ERROR] No known conditions for "./vite" specifier in "solid-devtools" package [plugin externalize-deps]

node_modules/esbuild/lib/main.js:1360:27:
  1360 │         let result = await callback({
  `
@maestrow
Copy link

Hi, @lakshbhutani. I've got the same issue. Then I update all my packages:

  "devDependencies": {
    "solid-devtools": "^0.27.3",
    "typescript": "^5.1.6",
    "vite": "^4.4.4",
    "vite-plugin-solid": "^2.7.0"
  },
  "dependencies": {
    "solid-js": "^1.7.8"
  }

Then after start I got [ERROR] Failed to resolve "solid-devtools/vite". This package is ESM only but it was tried to load by require. See http://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details. [plugin externalize-deps]. Following the link, a solution provided: adding "type": "module" to the nearest package.json. After that fix, it starts successfully.

@dcarr45
Copy link

dcarr45 commented Jul 17, 2023

Also not ideal but worth noting that the other solution on that Vite mentions, changing vite.config.ts -> vite.config.mts, seems to fix this issue without impacting the rest of the project.

@formbook
Copy link

Dont worry tho, Solid Start got funding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants