1

I enter "npx sv create" as I have done successfully numerous times before, and choose all defaults. The usual spinner begins, but this error appears. I have rebooted, tried different clean directories, but no joy. Using Macbook Air M3 chip. Here is the full error message (slightly formatted)

Failed to install dependencies
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: @sveltejs/vite-plugin-svelte@undefined
npm error node_modules/@sveltejs/vite-plugin-svelte
npm error   dev @sveltejs/vite-plugin-svelte@"^6.2.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @sveltejs/vite-plugin-svelte@"^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0" from @sveltejs/[email protected]
npm error node_modules/@sveltejs/kit
npm error   dev @sveltejs/kit@"^2.43.2" from the root project
npm error   peer @sveltejs/kit@"^2.0.0" from @sveltejs/[email protected]
npm error   node_modules/@sveltejs/adapter-auto
npm error     dev @sveltejs/adapter-auto@"^6.1.0" 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/lawrencebaldwin/.npm/_logs/2025-10-13T16_08_40_447Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/lawrencebaldwin/.npm/_logs/2025-10-13T16_08_40_447Z-debug-0.log
└  Operation failed.
2
  • I decided to try updating npm to npm@latest. Got similar errors. On that, I used sudo, which worked. After the update, this create process still failed. I then tried it with sudo, and it succeeded. But I still don't understand why sudo is necessary when it never has been previously and the SvelteKit docs make no mention of that. Commented Oct 14 at 19:03
  • This seems to be connected with my recent upgrade to Mac OS 25. Many apps no longer have access to files and folders that previously did. But I still don't know how to solve this. I will close this and open a new entry for "NPM requires sudo". Commented Oct 15 at 18:55

1 Answer 1

0

From another post, I modified my command as follows:

npx --legacy-peer-deps sv create

This gave me a new error that a file it was trying to create already existed. Following the advice given, I found that these were cache files in an .npx directory. I deleted all the cache files, and the command now works.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.