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

Node 20: Running any remix app returns TypeError: Value of "this" must be of type URLSearchParams #6118

Closed
1 task done
JacobJEdwards opened this issue Apr 20, 2023 · 9 comments · Fixed by #6120 · May be fixed by payloadcms/remix-server#16
Closed
1 task done

Comments

@JacobJEdwards
Copy link

What version of Remix are you using?

1.15.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

  • run npx create-remix@latest
  • my-remix-app
  • Just the basics
  • Remix App Server
  • Typescript
  • Yes
  • cd my-remix-app
  • npm run dev

Expected Behavior

localhost:3000 shows initial remix screen

Actual Behavior

Remix App Server started at http://localhost:3000 (http://192.168.1.82:3000)
TypeError: Value of "this" must be of type URLSearchParams
at new NodeError (node:internal/errors:399:5)
at Proxy.set (node:internal/url:519:13)
at Proxy. (/Users/jacobedwards/my-remix-app/node_modules/@remix-run/web-fetch/src/headers.js:124:44)
at createRemixHeaders (/Users/jacobedwards/my-remix-app/node_modules/@remix-run/express/dist/server.js:57:17)
at createRemixRequest (/Users/jacobedwards/my-remix-app/node_modules/@remix-run/express/dist/server.js:71:14)
at /Users/jacobedwards/my-remix-app/node_modules/@remix-run/express/dist/server.js:37:21
at /Users/jacobedwards/my-remix-app/node_modules/@remix-run/serve/dist/index.js:47:7
at Layer.handle [as handle_request] (/Users/jacobedwards/my-remix-app/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/jacobedwards/my-remix-app/node_modules/express/lib/router/route.js:144:13)
at next (/Users/jacobedwards/my-remix-app/node_modules/express/lib/router/route.js:140:7)
GET / 500 - - 100.150 ms

@Filmtangent
Copy link

I seem to be facing this too on a test project with the following set in package.json:

"@remix-run/node": "^1.15.0,
"@remix-run/react": "^1.15.0",
"@remix-run/serve": "^1.15.0"

v2_routeConvention is true

full package.json below:

{
  "private": true,
  "sideEffects": false,
  "scripts": {
    "build": "remix build",
    "dev": "remix dev",
    "start": "remix-serve build",
    "typecheck": "tsc"
  },
  "dependencies": {
    "@aws-sdk/client-cost-explorer": "^3.301.0",
    "@azure/msal-browser": "^2.35.0",
    "@azure/msal-react": "^1.5.5",
    "@prisma/client": "^4.12.0",
    "@remix-run/node": "^1.15.0",
    "@remix-run/react": "^1.15.0",
    "@remix-run/serve": "^1.15.0",
    "@tailwindcss/forms": "latest",
    "aws-sdk": "latest",
    "daisyui": "^2.51.5",
    "date-fns": "^2.29.3",
    "esbuild": "^0.17.16",
    "esbuild-register": "^3.4.2",
    "isbot": "^3.6.5",
    "jwt-decode": "^3.1.2",
    "postcss": "^8.4.21",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "remix-auth": "^3.4.0",
    "remix-auth-microsoft": "^2.0.0",
    "tiny-invariant": "^1.3.1"
  },
  "devDependencies": {
    "@remix-run/dev": "^1.15.0",
    "@remix-run/eslint-config": "^1.15.0",
    "@types/react": "^18.0.25",
    "@types/react-dom": "^18.0.8",
    "eslint": "^8.27.0",
    "prisma": "^4.12.0",
    "tailwindcss": "^3.3.1",
    "typescript": "^4.8.4"
  },
  "engines": {
    "node": ">=14"
  }
}

@nicksrandall
Copy link
Contributor

I just ran into this when trying to upgrade to node v20.

@silas
Copy link

silas commented Apr 20, 2023

I fixed this for my project by updating to @remix-run/web-fetch@^4.3.4 (see remix-run/web-std-io#32)

@TheGreatAxios
Copy link

For others who will run into this issue, additional confirmation that bumping to Node 20.0.0 results in this error

@mcansh mcansh linked a pull request Apr 24, 2023 that will close this issue
MilanVasko pushed a commit to Itera/sk-cop-wrkshp-remix that referenced this issue Apr 25, 2023
This was necessary because, apparently, there is a bug in Remix when
using a recent enough version of Node (20.0.0).

See the following issue for more info:

- remix-run/remix#6118
@machour
Copy link
Collaborator

machour commented Apr 25, 2023

@JacobJEdwards can you confirm that this a node 20 related issue?

@m5r
Copy link
Contributor

m5r commented Apr 26, 2023

I can confirm it happens with node 20 and not with node 18

@machour machour changed the title Running any remix app returns TypeError: Value of "this" must be of type URLSearchParams Node 20: Running any remix app returns TypeError: Value of "this" must be of type URLSearchParams Apr 26, 2023
@machour machour reopened this Apr 29, 2023
@machour machour added the awaiting release This issue has been fixed and will be released soon label Apr 29, 2023
@machour
Copy link
Collaborator

machour commented May 1, 2023

This should be fixed in 1.16.0, please reopen if this is still an issue!

@machour machour closed this as completed May 1, 2023
@machour machour removed the awaiting release This issue has been fixed and will be released soon label May 1, 2023
LauSam09 added a commit to LauSam09/crop-planner that referenced this issue May 23, 2023
@rajeshdavidbabu
Copy link

Can confirm that updating to 1.16.0 fixed it !

@nhd2106
Copy link

nhd2106 commented Apr 5, 2024

1.16.0 fixed my problem too

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