Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/long-pens-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@shopify/hydrogen': minor
'example-css-modules': minor
'template-hydrogen-default': minor
---

Upgrade body-parser
2 changes: 1 addition & 1 deletion examples/css-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@shopify/hydrogen": "latest",
"body-parser": "^1.19.1",
"body-parser": "^1.20.0",
"compression": "^1.7.4",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two solutions to fix this:

  1. Upgrade body-parser (1.20.0) can fix it.
  2. Remove it.

The example doesn't use the package. It can be removed.

compression is useless. I think it can be removed too.

@jplhomer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. The inclusion of these packages as deps should not cause a dev server error. They are not used in the Hydrogen dev server. 🤔 Can you walk me through the reasoning here?

Copy link
Contributor Author

@arlyxiao arlyxiao May 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error is from the file: examples/css-modules/node_modules/@shopify/hydrogen/node_modules/body-parser/node_modules/http-errors/index.js:261:45)
statuses

The statuses object doesn't have message property

Take a look at the commit (6 months ago) in the http-errors.

jshttp/http-errors@8c38486

before-changes

This can explain that why it throws the error. statuses object which is from another dependency package is not the latest with http-errors package.

When upgrade body-parser into the latest(1.20.0). Then all of the dependencies are latest. So the issue disappear. @jplhomer

"react": "0.0.0-experimental-2bf7c02f0-20220314",
"react-dom": "0.0.0-experimental-2bf7c02f0-20220314",
Expand Down
Loading