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

Astro error, node 18.17.1 is not supported #21515

Closed
JonathonRP opened this issue Dec 8, 2023 · 1 comment · Fixed by #22709
Closed

Astro error, node 18.17.1 is not supported #21515

JonathonRP opened this issue Dec 8, 2023 · 1 comment · Fixed by #22709
Assignees
Labels
good first issue Good for newcomers needs investigation requires further investigation before determining if it is an issue or not node API polyfill Related to various "node:*" modules APIs node compat

Comments

@JonathonRP
Copy link

JonathonRP commented Dec 8, 2023

Version: Deno canary

Repro:

os and setup info:

window 11, wsl - ubuntu, devcontainer - os = ubuntu: jammy, platform = amd64

{ 
"features": {
    "ghcr.io/devcontainers-contrib/featurs/deno:1": {}
 }
}

setup steps

sudo deno upgrade --canary
curl -fsSL https://get.pnpm.io/install.sh | sh -
pnpm env use --global 20.10.0
pnpm i

package.json

{
  "type": "module",
  "scripts": {
        "dev": "astro dev",
        "start": "astro dev",
        "build": "astro check && tsc --noEmit && astro build",
        "preview": "astro preview",
    },
    "devDependencies": {
        "astro": "^4.0.0",
        "svelte": "5.0.0-next.20",
        "@astrojs/svelte": "^5.0.0",
        "@astrojs/check": "0.2.0",
        "sass": "latest",
        "@types/node": "20.10.3",
        "@typescript-eslint/eslint-plugin": "^6.7.4",
        "@typescript-eslint/parser": "^6.7.4",
        "eslint": "^8.50.0",
        "eslint-config-prettier": "^9.0.0",
        "eslint-plugin-prettier": "^5.0.0",
        "eslint-plugin-astro": "^0.29.1",
        "eslint-plugin-svelte": "^2.35.1",
        "prettier": "^3.0.3",
        "prettier-plugin-astro": "^0.12.2",
        "prettier-plugin-svelte": "^3.0.3",
        "svelte-eslint-parser": "^0.33.1"
    },
}

deno.json

{
  "unstable": ["byonm"]
}

command

deno task dev

Result:

➜ deno task dev 
Node.js v18.17.1 is not supported by Astro!
Please upgrade Node.js to a supported version: ">=18.14.1"
@dsherret dsherret added needs investigation requires further investigation before determining if it is an issue or not node compat labels Dec 8, 2023
@marvinhagemeister
Copy link
Contributor

This should be an easy fix. The version strings need to be updated in this file

export const version = "v18.18.0";
/**
* https://nodejs.org/api/process.html#process_process_versions
*
* This value is hard coded to latest stable release of Node, as
* some packages are checking it for compatibility. Previously
* it contained only output of `Deno.version`, but that led to incompability
* with some packages. Value of `v8` field is still taken from `Deno.version`.
*/
export const versions = {
node: "18.17.1",
uv: "1.43.0",
zlib: "1.2.11",
brotli: "1.0.9",
ares: "1.18.1",
modules: "108",
nghttp2: "1.47.0",
napi: "8",
llhttp: "6.0.10",
openssl: "3.0.7+quic",
cldr: "41.0",
icu: "71.1",
tz: "2022b",
unicode: "14.0",
ngtcp2: "0.8.1",
nghttp3: "0.7.0",
// Will be filled when calling "__bootstrapNodeProcess()",
deno: "",
v8: "",
typescript: "",
};

@marvinhagemeister marvinhagemeister added the good first issue Good for newcomers label Feb 20, 2024
@bartlomieju bartlomieju added the node API polyfill Related to various "node:*" modules APIs label Mar 4, 2024
marvinhagemeister added a commit that referenced this issue Mar 5, 2024
<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->
The issue seems to be already fixed since we upped to a newer 18.x
version string in [another
PR](#20366). Updating to latest
node LTS version can't hurt though.

Fixes #21515
littledivy pushed a commit that referenced this issue Mar 8, 2024
<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->
The issue seems to be already fixed since we upped to a newer 18.x
version string in [another
PR](#20366). Updating to latest
node LTS version can't hurt though.

Fixes #21515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers needs investigation requires further investigation before determining if it is an issue or not node API polyfill Related to various "node:*" modules APIs node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants