#Dependency error using npm init solid@latest

17 messages · Page 1 of 1 (latest)

cursive stag
#

I am unable to initialize a SolidStart project using npm init solid@latest. I have tried multiple templates including basic, with-authjs, and with-tailwindcss, but all have failed with dependency errors when running npm install for the first time.

Since the length of the error exceeds the character limit (2000), I'll include the error in the comments.

#

Here is an example of an error that I have gotten

Repro:

  1. npm init solid@latest
  2. npm install
    error:
npm error code EOVERRIDE
npm error Override for vite@^5.1.6 conflicts with direct dependency
npm error A complete log of this run can be found in: /Users/redacted/.npm/_logs/2025-02-11T05_00_43_078Z-debug-0.log

package.json

{
  "name": "example-with-authjs",
  "scripts": {
    "dev": "vinxi dev",
    "build": "vinxi build",
    "start": "vinxi start",
    "lint": "eslint --fix \"**/*.{ts,tsx,js,jsx}\""
  },
  "type": "module",
  "devDependencies": {
    "@types/node": "^20.11.26",
    "@typescript-eslint/eslint-plugin": "^7.6.0",
    "@typescript-eslint/parser": "^7.6.0",
    "eslint": "^8.56.0",
    "eslint-plugin-solid": "^0.14.3",
    "typescript": "^5.6.2",
    "vite": "^5.1.6"
  },
  "dependencies": {
    "@solidjs/router": "^0.15.1",
    "@solidjs/start": "^1.0.11",
    "solid-js": "^1.9.2",
    "vinxi": "^0.4.3",
    "@solidjs/meta": "^0.29.4",
    "zod": "^3.22.4",
    "@auth/core": "0.37.0",
    "@solid-mediakit/auth": "^3.1.2",
    "postcss": "^8.4.40",
    "autoprefixer": "^10.4.19",
    "tailwindcss": "^3.4.7"
  },
  "overrides": {
    "vite": "5.4.10"
  },
  "engines": {
    "node": ">=16"
  }
}
#
  1. delete the override
  2. npm install
    error:
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: example-with-authjs@undefined
npm error Found: [email protected]
npm error node_modules/vinxi
npm error   vinxi@"^0.4.3" from the root project
npm error
npm error Could not resolve dependency:
npm error peer vinxi@"^0.5.3" from @solidjs/[email protected]
npm error node_modules/@solidjs/start
npm error   @solidjs/start@"^1.0.11" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/redacted/.npm/_logs/2025-02-11T05_04_06_036Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/redacted/.npm/_logs/2025-02-11T05_04_06_036Z-debug-0.log
#

Create-Solid v0.5.14

oak radish
#

what happens if you set the version of vite in the devdependencies list to the same version as the override?

cursive stag
#

If I do that by replacing "vite": "^5.1.6" with "vite": "5.4.10", and then re-run npm install, then I get

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: example-with-authjs@undefined
npm error Found: [email protected]
npm error node_modules/vinxi
npm error   vinxi@"^0.4.3" from the root project
npm error
npm error Could not resolve dependency:
npm error peer vinxi@"^0.5.3" from @solidjs/[email protected]
npm error node_modules/@solidjs/start
npm error   @solidjs/start@"^1.0.11" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
oak radish
#

hmm, too bad, thought I was clever for a sec. hmmm, lemme think

cursive stag
#

And following the same strategy, if I replace "vinxi": "^0.4.3", with "vinxi": "^0.5.3", and re-run npm install, then I get

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: example-with-authjs@undefined
npm error Found: @auth/[email protected]
npm error node_modules/@auth/core
npm error   @auth/core@"0.37.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @auth/core@"^0.37.3" from @solid-mediakit/[email protected]
npm error node_modules/@solid-mediakit/auth
npm error   @solid-mediakit/auth@"^3.1.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
oak radish
#

I am happy to share you my package json. might be a couple weeks out of date, and would not resolve the error you are reporting here, but at least you are no longer stuck

oak radish
#
{
  "name": "app-name",
  "type": "module",
  "engines": {
    "node": ">=18",
    "bun": ">=1"
  },
  "dependencies": {
    "@solid-primitives/clipboard": "^1.5.10",
    "@solid-primitives/destructure": "^0.2.0",
    "@solid-primitives/i18n": "^2.1.1",
    "@solid-primitives/scheduled": "^1.4.4",
    "@solid-primitives/storage": "^4.2.1",
    "@solid-primitives/timer": "^1.4.0",
    "@solidjs/meta": "^0.29.4",
    "@solidjs/router": "^0.15.3",
    "@solidjs/start": "^1.0.11",
    "dexie": "^4.0.11",
    "flag-icons": "^7.3.0",
    "iterator-helpers-polyfill": "^3.0.1",
    "sitemap": "^8.0.0",
    "solid-icons": "^1.1.0",
    "solid-js": "^1.9.4",
    "ts-pattern": "^5.6.0",
    "vinxi": "^0.4.3"
  },
  "devDependencies": {
    "@happy-dom/global-registrator": "^15.11.7",
    "@sinonjs/fake-timers": "^14.0.0",
    "@solidjs/testing-library": "^0.8.10",
    "@testing-library/jest-dom": "^6.6.3",
    "@testing-library/user-event": "^14.6.0",
    "@types/wicg-file-system-access": "^2023.10.5",
    "bun-types": "^1.1.43",
    "jsdom": "^25.0.1",
    "vite-plugin-pwa": "^0.21.1",
    "vite-plugin-solid-svg": "^0.8.1",
    "workbox-window": "^7.3.0"
  },
  "scripts": {
    "dev": "vinxi dev",
    "build": "vinxi build",
    "start": "vinxi start",
    "version": "vinxi version"
  }
}
#

this is the complete list of deps I use atm, you'll want to cherry pick which ones you wanna keep

#

pretty sure you could clear out all the dev-deps for instance. and many of the other deps are nice-to-haves I think

jovial delta
#

Actually SolidStart went 1.1.0 yesterday
#announcements message

and npm lists it as available 11 hours ago but it doesn't look like the with-authjs template is in sync (doesn't look like any of them have moved to 1.1.0 yet 🤨 ).

GitHub

SolidStart, the Solid app framework. Contribute to solidjs/solid-start development by creating an account on GitHub.

jovial delta
#

After a initializing a fresh project in package.json change

"@solidjs/start": "^1.0.11",

to

"@solidjs/start": "1.0.11",

before running install; that will stop the complaints.
(Though people are having problems with tailwind v4)

last thorn
#

Maybe removing overrides and upgrading vinxi to ^0.5.3 helps.