Dhravya / cloudflare-saas-stack

Quickly make and deploy full-stack apps with database, auth, styling, storage etc. figured out for you. Add all primitives you want.
3.09k stars 231 forks source link

it's error when run bun run dev #48

Open dforel opened 1 month ago

dforel commented 1 month ago

i hava run : npm i -g bun then run : bun install bun run setup

when i open http://localhost:3000 it show : Internal Server Error errorcode:

 ⨯ ./src/app/page.tsx?__next_edge_ssr_entry__:22:2
Syntax error: Support for the experimental syntax 'jsx' isn't currently enabled (22:3):

  20 |
  21 |  return (
> 22 |          <main className="flex flex-col items-center justify-center min-h-screen">
     |          ^
  23 |                  <div className="flex max-w-2xl justify-between w-full">
  24 |                          <SetThemeButton />
  25 |

Add @babel/preset-react (https://github.com/babel/babel/tree/main/packages/babel-preset-react) to the 'presets' section of your Babel config to enable transformation.     
If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx) to the 'plugins' section to enable 
parsing.
 ⨯ ./src/app/not-found.tsx?__next_edge_ssr_entry__:5:4
Syntax error: Support for the experimental syntax 'jsx' isn't currently enabled (5:5):

  3 | export default function NotFound() {
  4 |   return (
> 5 |     <view>
    |     ^
  6 |       <title>404: This page could not be found.</title>
  7 |       <div style={styles.error}>
  8 |         <div>

Add @babel/preset-react (https://github.com/babel/babel/tree/main/packages/babel-preset-react) to the 'presets' section of your Babel config to enable transformation.     
If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx) to the 'plugins' section to enable 
parsing.
appDir undefined pagesDir undefined
babelConfigFile E:\workspace\rrrr\cloudflare-saas-stack-main\.babelrc
 ⨯ TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at Object.dirname (node:path:658:5)
    at getBabelLoader (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\build\webpack-config.js:361:39)
    at getBaseWebpackConfig (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\build\webpack-config.js:368:6)
    at HotReloaderWebpack.buildFallbackError (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\hot-reloader-webpack.js:553:65)     
    at async DevBundlerService.getFallbackErrorComponents (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\dev-bundler-service.js:25:9)
    at async DevServer.getFallbackErrorComponents (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\next-dev-server.js:593:9)      
    at async DevServer.renderErrorToResponseImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\base-server.js:2180:40)
    at async DevServer.pipeImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\base-server.js:914:25)
    at async NextNodeServer.handleCatchallRenderRequest (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\next-server.js:231:21)       
    at async DevServer.handleRequestImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\base-server.js:810:17)
    at async E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\next-dev-server.js:339:20
    at async Span.traceAsyncFn (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\trace\trace.js:154:20)
    at async DevServer.handleRequest (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\next-dev-server.js:336:24)
    at async invokeRender (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\router-server.js:173:21)
    at async handleRequest (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\router-server.js:350:24)
    at async requestHandlerImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\router-server.js:374:13)
    at async Server.requestListener (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\start-server.js:141:13) {
  code: 'ERR_INVALID_ARG_TYPE'
}
appDir undefined pagesDir undefined
babelConfigFile E:\workspace\rrrr\cloudflare-saas-stack-main\.babelrc
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at Object.dirname (node:path:658:5)
    at getBabelLoader (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\build\webpack-config.js:361:39)
    at getBaseWebpackConfig (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\build\webpack-config.js:368:6)
    at HotReloaderWebpack.buildFallbackError (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\hot-reloader-webpack.js:553:65)     
    at async DevBundlerService.getFallbackErrorComponents (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\dev-bundler-service.js:25:9)
    at async DevServer.getFallbackErrorComponents (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\next-dev-server.js:593:9)      
    at async DevServer.renderErrorToResponseImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\base-server.js:2180:40)
    at async DevServer.pipeImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\base-server.js:914:25)
    at async NextNodeServer.handleCatchallRenderRequest (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\next-server.js:231:21)       
    at async DevServer.handleRequestImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\base-server.js:810:17)
    at async E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\next-dev-server.js:339:20
    at async Span.traceAsyncFn (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\trace\trace.js:154:20)
    at async DevServer.handleRequest (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\next-dev-server.js:336:24)
    at async invokeRender (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\router-server.js:173:21)
    at async handleRequest (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\router-server.js:350:24)
    at async requestHandlerImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\router-server.js:374:13)
    at async Server.requestListener (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\start-server.js:141:13) {
  code: 'ERR_INVALID_ARG_TYPE'
}
appDir undefined pagesDir undefined
babelConfigFile E:\workspace\rrrr\cloudflare-saas-stack-main\.babelrc
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at Object.dirname (node:path:658:5)
    at getBabelLoader (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\build\webpack-config.js:361:39)
    at getBaseWebpackConfig (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\build\webpack-config.js:368:6)
    at HotReloaderWebpack.buildFallbackError (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\hot-reloader-webpack.js:553:65)     
    at async DevServer.renderErrorToResponseImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\base-server.js:2180:40)
    at async pipe.req.req (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\base-server.js:2033:30)
    at async DevServer.pipeImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\base-server.js:914:25)
    at async E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\next-dev-server.js:339:20
    at async Span.traceAsyncFn (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\trace\trace.js:154:20)
    at async DevServer.handleRequest (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\dev\next-dev-server.js:336:24)
    at async invokeRender (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\router-server.js:173:21)
    at async requestHandlerImpl (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\router-server.js:386:24)
    at async Server.requestListener (E:\workspace\rrrr\cloudflare-saas-stack-main\node_modules\next\dist\server\lib\start-server.js:141:13) {
  code: 'ERR_INVALID_ARG_TYPE'
}