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

[bug]: When express-sharp is down, the media files don't get served. #1808

Closed
rancollier opened this issue Sep 30, 2019 · 1 comment · Fixed by #1830
Closed

[bug]: When express-sharp is down, the media files don't get served. #1808

rancollier opened this issue Sep 30, 2019 · 1 comment · Fixed by #1830
Assignees
Labels
bug Something isn't working

Comments

@rancollier
Copy link

When express-sharp is down, the media files don't get served.

Emitting no ServiceWorker in development mode. To enable development mode for ServiceWorkers, pass `enableServiceWorkerDebugging: true` to the ServiceWorkerPlugin configuration.
Cannot add image optimization middleware due to dependencies that are not installed or are not compatible with this environment:
- @magento/express-sharp: Reason: Found vendored libvips v8.8.1 but require v8.7.4. Please remove the 'node_modules/sharp/vendor' directory and run 'npm install'.
- @magento/express-sharp: Reason: expressSharp is not a function

@zetlen found a possible solution.
https://github.com/magento/pwa-studio/blob/develop/packages/venia-ui/upward.yml#L15
needs to be updated to: pattern: '^/(graphql|rest|media)(/|$)'

@rancollier rancollier added the bug Something isn't working label Sep 30, 2019
zetlen pushed a commit that referenced this issue Oct 3, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.
zetlen pushed a commit that referenced this issue Oct 3, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.
@zetlen
Copy link
Contributor

zetlen commented Oct 3, 2019

Hey, this is an oversight in upward.yml and I've got it fixed in #1830, which also updates express-sharp to the version that respects NODE_TLS_REJECT_UNAUTHORIZED=0.

zetlen pushed a commit that referenced this issue Oct 4, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.

test: coverage for addImgOptMiddleware changes
zetlen pushed a commit that referenced this issue Oct 4, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.

test: coverage for addImgOptMiddleware changes
zetlen pushed a commit that referenced this issue Oct 7, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.

test: coverage for addImgOptMiddleware changes
dpatil-magento pushed a commit that referenced this issue Oct 10, 2019
* feat: Simplify image middleware with express-sharp update

The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.

test: coverage for addImgOptMiddleware changes

* fix: WebP content negotiation. Closes #1842

* fixup prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants