withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
47.05k stars 2.5k forks source link

Could not install Deno #9961

Closed jamesli2021 closed 9 months ago

jamesli2021 commented 9 months ago

Astro Info

npx astro add deno
✔ Resolving packages...
15:25:54 
  Astro will run the following command:
  If you skip this step, you can always run it yourself later

 ╭───────────────────────────────────╮
 │ npm install @astrojs/deno@^5.0.1  │
 ╰───────────────────────────────────╯

✔ Continue? … yes
✖ Installing dependencies...

 Command failed with exit code 1: npm install @astrojs/deno@^5.0.1
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: spiffy-solstice@0.0.1
npm ERR! Found: astro@4.3.2
npm ERR! node_modules/astro
npm ERR!   astro@"^4.3.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer astro@"^3.1.4" from @astrojs/deno@5.0.1
npm ERR! node_modules/@astrojs/deno
npm ERR!   @astrojs/deno@"^5.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /Users/s/.npm/_logs/2024-02-03T07_25_55_260Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/s/.npm/_logs/2024-02-03T07_25_55_260Z-debug-0.log 

Astro could not update your astro.config.js file safely.
Reason: Unable to install dependencies

You will need to add these integration(s) manually.
Documentation: https://docs.astro.build/en/guides/integrations-guide/
  Stack trace:
    at add (file:///Users/s/Documents/spiffy-solstice/node_modules/astro/dist/cli/add/index.js:181:31)
    at async runCommand (file:///Users/s/Documents/spiffy-solstice/node_modules/astro/dist/cli/index.js:108:7)


### If this issue only occurs in one browser, which browser is a problem?

No

### Describe the Bug

See above.

### What's the expected result?

See above.

### Link to Minimal Reproducible Example

NA

### Participation

- [ ] I am willing to submit a pull request for this issue.
ematipico commented 9 months ago

As you can from the error, you have an issue with your dependencies, which you need to fix manually. Astro won't do that for you.

jamesli2021 commented 9 months ago

@ematipico So this issue is coming from a fresh new Astro project, what is the dependencies with Astro?

jamesli2021 commented 9 months ago

So deno adapter is having issue.

Astro project looks fine. package.json

{
  "name": "cosmic-cluster",
  "type": "module",
  "version": "0.0.1",
  "scripts": {
    "dev": "astro dev",
    "start": "astro dev",
    "build": "astro check && astro build",
    "preview": "astro preview",
    "astro": "astro"
  },
  "dependencies": {
    "astro": "^4.3.2",
    "@astrojs/check": "^0.4.1",
    "typescript": "^5.3.3"
  }
}
ematipico commented 9 months ago

You'll have to file an issue in the Deno adapter repository https://github.com/denoland/deno-astro-adapter