bun
bun copied to clipboard
ssr next example not working
Version
0.1.11
Platform
Linux/ARch
What steps will reproduce the bug?
https://github.com/oven-sh/bun/tree/main/packages/bun-framework-next
This doesnt' seem to work. I get a blank page.
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
blank page
Additional information
No response
Check https://github.com/oven-sh/bun/tree/main/examples/next
Now I get this error:
[0.03ms] "node_modules.bun" - 74 modules, 6 packages
7 | function _interopRequireDefault(obj) {
8 | return obj && obj.__esModule ? obj : {
9 | default: obj
10 | };
11 | }
12 | const LoadableContext = _react.default.createContext(null);
^
TypeError: _react.default.createContext is not a function. (In '_react.default.createContext(null)', '_react.default.createContext' is undefined)
at /tmp/app/node_modules/next/dist/shared/lib/loadable-context.js:12:24
at http://localhost:3000/blob:node_modules.server.bun:7:13088
at /tmp/app/node_modules/next/dist/shared/lib/loadable.js:7:31
at http://localhost:3000/blob:node_modules.server.bun:7:13088
at /tmp/app/node_modules/bun-framework-next/renderDocument.tsx:4:0
JavaScript VM failed to start.
try bun bun index.jsx
➜ app git:(master) ✗
$ bun bun index.jsx
error: ModuleNotFound resolving "index.jsx" (entry point)
error: ModuleNotFound resolving "index.jsx" (entry point)
bun bun src/index.jsx (your main file)
Update example Next app to 12.3
bun dev and bun bun were changed in Bun v1.0, it will now run the "dev" script in your package.json, and run bun build respectively. Because of that, this issue is no longer applicable.