[remix] Buffer is not defined
Open
@mnajdova is already working on this.
Since Aug 22, 2023.
examples
external dependency
scope: system
type: bug
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Steps to reproduce 🕹
Link to live example:
Steps:
- Create a new Remix project using
npx create-remix@latest - Add the necessary MUI (following the remix example) and Cloudflare dependencies and configurations
- run the app
npm run dev
repository: https://github.com/matrixersp/remix-with-mui
Current behavior 😯
I get the following error:
service core:user:worker: Uncaught ReferenceError: Buffer is not defined
at regd1tya9jj.js:21735:58 in node_modules/html-tokenize/node_modules/buffer-from/index.js
at regd1tya9jj.js:82:50
at regd1tya9jj.js:23774:22 in node_modules/html-tokenize/index.js
at regd1tya9jj.js:25708:49 in node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.cjs.dev.js
at regd1tya9jj.js:82:50
at regd1tya9jj.js:25810:22 in node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.cjs.js
at regd1tya9jj.js:82:50
✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
Expected behavior 🤔
The app should run successfully.
Context 🔦
Trying to add MUI to a Remix app that runs on Cloudflare
Your environment 🌎
npx @mui/envinfo
System:
OS: Linux 6.4 Fedora Linux 38 (Workstation Edition)
Binaries:
Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 9.8.0 - ~/.nvm/versions/node/v18.14.2/bin/npm
Browsers:
Chrome: 116.0.5845.96
npmPackages:
@emotion/react: ^11.11.1 => 11.11.1
@emotion/styled: ^11.11.0 => 11.11.0
@mui/base: 5.0.0-beta.11
@mui/core-downloads-tracker: 5.14.5
@mui/material: ^5.14.5 => 5.14.5
@mui/private-theming: 5.14.5
@mui/styled-engine: 5.13.2
@mui/system: 5.14.5
@mui/types: 7.2.4
@mui/utils: 5.14.5
@types/react: ^18.0.35 => 18.2.20
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
typescript: ^5.0.4 => 5.1.6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.