Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

drawer - Element is not defined in SSR build #594

Closed
moog16 opened this issue Jan 4, 2019 · 5 comments
Closed

drawer - Element is not defined in SSR build #594

moog16 opened this issue Jan 4, 2019 · 5 comments

Comments

@moog16
Copy link

moog16 commented Jan 4, 2019

similar to #581

While testing out the PR fix for #581, I also stumbled on to a build error on drawer.

ReferenceError: Element is not defined
    at Object.105 (/usr/local/google/home/mattgoo/Downloads/material-next-template-master/node_modules/@material/drawer/dist/mdc.drawer.js:809:15)
    at __webpack_require__ (/usr/local/google/home/mattgoo/Downloads/material-next-template-master/node_modules/@material/drawer/dist/mdc.drawer.js:35:30)

This requires a similar fix to #581 found in #592.

@4cm4k1
Copy link
Contributor

4cm4k1 commented Jan 4, 2019

It looks like this comes from @material/drawer, not @material/react-drawer, because of tabbable (https://github.com/davidtheclark/tabbable/blob/3.1.2/index.js#L14), but the MDC Web team landed this fix which should be in their next release: material-components/material-components-web#4217 😄

@moog16
Copy link
Author

moog16 commented Jan 4, 2019

ah you're right...this is a duplicate. Thanks @4cm4k1

@rustemgareev
Copy link

I'm using the latest version of @material/react-drawer (0.11.0) and still having this issue on my SSR project (built using Next.js). I tried to add resolutions to my package.json as recommended here but had no luck. Any chance to get it fixed?

@rustemgareev
Copy link

@material/react-drawer v0.6.2 works fine though.

@moog16
Copy link
Author

moog16 commented Apr 23, 2019

@rustemgareev we haven't updated to the latest mdc web v1. We're currently working on it. Progess is tracked through #697.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants