Title: Uncaught ReferenceError: Buffer is not defined · Issue #72 · mysqljs/sqlstring · GitHub
Open Graph Title: Uncaught ReferenceError: Buffer is not defined · Issue #72 · mysqljs/sqlstring
X Title: Uncaught ReferenceError: Buffer is not defined · Issue #72 · mysqljs/sqlstring
Description: When using SqlString.raw the error "Uncaught ReferenceError: Buffer is not defined" is throwing when using SqlString in a react site. This was discovered with react 17, vite 7. Interestingly the vitest tests did not have this issue indic...
Open Graph Description: When using SqlString.raw the error "Uncaught ReferenceError: Buffer is not defined" is throwing when using SqlString in a react site. This was discovered with react 17, vite 7. Interestingly the vi...
X Description: When using SqlString.raw the error "Uncaught ReferenceError: Buffer is not defined" is throwing when using SqlString in a react site. This was discovered with react 17, vite 7. Interestin...
Opengraph URL: https://github.com/mysqljs/sqlstring/issues/72
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Uncaught ReferenceError: Buffer is not defined","articleBody":"When using SqlString.raw the error \"Uncaught ReferenceError: Buffer is not defined\" is throwing when using SqlString in a react site.\n\nThis was discovered with react 17, vite 7. Interestingly the vitest tests did not have this issue indicating that the polyfill was not supplying the buffer when running the site directly but was when running the tests.\n\n\u003cimg width=\"1920\" height=\"1032\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/19eb1692-de68-41f5-bd3a-f90ffb57ce31\" />\n\nIf I manually add buffer to the window prior to running the raw method I don't have a problem, but I shouldn't need to implement a workaround in order to use the library's functionality.\n\n\u003cimg width=\"755\" height=\"158\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/49f0a644-88cc-485d-a52d-67062fb66e90\" />","author":{"url":"https://github.com/KennethJamesCurrie","@type":"Person","name":"KennethJamesCurrie"},"datePublished":"2026-03-16T12:34:57Z","url":"https://github.com/mysqljs/sqlstring/issues/72"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:76c199d3-8639-bd83-8d47-c9d63bc45db8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E0C:3C1C49:31F7103:419C7A0:6B03A604 |
| html-safe-nonce | 7046462c719b63fb5ff5b20dd557920a0ef3e886dc4f4b6d6553d45e6c5ad2c5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTBDOjNDMUM0OTozMUY3MTAzOjQxOUM3QTA6NkIwM0E2MDQiLCJ2aXNpdG9yX2lkIjoiNDAyMTc5OTg3NDQ2MTkzNTEwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a60297b2cfbabc30f2879cf2d6d0c7d83442d69e4f185e09fdd0ec9f4d321938 |
| hovercard-subject-tag | issue:4082220968 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/mysqljs/sqlstring/72/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a3e4cf62f407b359e0e3f4fb53a2737229997f6afa7849aa9e0e2d55a3694c05/mysqljs/sqlstring/issues/72 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a3e4cf62f407b359e0e3f4fb53a2737229997f6afa7849aa9e0e2d55a3694c05/mysqljs/sqlstring/issues/72 |
| og:image:alt | When using SqlString.raw the error "Uncaught ReferenceError: Buffer is not defined" is throwing when using SqlString in a react site. This was discovered with react 17, vite 7. Interestingly the vi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KennethJamesCurrie |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/mysqljs/sqlstring git https://github.com/mysqljs/sqlstring.git |
| octolytics-dimension-user_id | 18713232 |
| octolytics-dimension-user_login | mysqljs |
| octolytics-dimension-repository_id | 17160353 |
| octolytics-dimension-repository_nwo | mysqljs/sqlstring |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17160353 |
| octolytics-dimension-repository_network_root_nwo | mysqljs/sqlstring |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width