bun icon indicating copy to clipboard operation
bun copied to clipboard

ssr next example not working

Open ralyodio opened this issue 3 years ago • 6 comments

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

ralyodio avatar Sep 13 '22 12:09 ralyodio

Check https://github.com/oven-sh/bun/tree/main/examples/next

xhyrom avatar Sep 14 '22 13:09 xhyrom

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.

ralyodio avatar Sep 15 '22 13:09 ralyodio

try bun bun index.jsx

xhyrom avatar Sep 15 '22 13:09 xhyrom


➜  app git:(master) ✗ 
$ bun bun index.jsx


error: ModuleNotFound resolving "index.jsx" (entry point)



error: ModuleNotFound resolving "index.jsx" (entry point)

ralyodio avatar Sep 15 '22 13:09 ralyodio

bun bun src/index.jsx (your main file)

xhyrom avatar Sep 15 '22 17:09 xhyrom

Update example Next app to 12.3

himyjan avatar Sep 18 '22 10:09 himyjan

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.

Electroid avatar Oct 25 '23 18:10 Electroid