Git Product home page Git Product logo

Comments (6)

futantan avatar futantan commented on August 21, 2024

不好意思,我使用的是 serverless 数据库,并不存在这样的问题。
这个 issue 会留在这里一段时间,看看其他人是否有解决方案。

from opengpt.

Leizhenpeng avatar Leizhenpeng commented on August 21, 2024

The error code P1010 indicates that the user was denied access on the database opengpt.

You can log in to your MySQL instance as a root user and run the following command to grant the necessary permissions:

GRANT ALL PRIVILEGES ON opengpt.* TO 'opengpt'@'localhost';

or use docker-compose create new database env

refer : ffff58e

@yuanweize

from opengpt.

yuanweize avatar yuanweize commented on August 21, 2024

谢谢,已经导入了

如果使用宝塔的aapanel的mysql和phpmyadmin建立数据库,请前往phpmyadmin的用户账户选项卡,将opengpt用户的全局权限设置为全勾选ALL PRIVILEGES,这样就可以成功导入migrations了。

If you use the mysql and phpmyadmin of aapanel in BT to establish a database, please go to the user account tab of phpmyadmin, set the Global privileges of opengpt user to select ALL PRIVILEGES, so that migrations can be successfully imported.

from opengpt.

yuanweize avatar yuanweize commented on August 21, 2024

The error code P1010 indicates that the user was denied access on the database opengpt.

You can log in to your MySQL instance as a root user and run the following command to grant the necessary permissions:

GRANT ALL PRIVILEGES ON opengpt.* TO 'opengpt'@'localhost';

or use docker-compose create new database env

refer : ffff58e

@yuanweize

佬,要不要把action打包docker也一起PR下

from opengpt.

yuanweize avatar yuanweize commented on August 21, 2024

Deployment on Vercel was successful, just add the environment variable DATABASE_URL." => "在Vercel上部署成功了,只需添加环境变量DATABASE_URL即可。



Import trace for requested module:
--
12:58:57.996 | ./node_modules/.pnpm/@[email protected]/node_modules/@upstash/redis/esm/platforms/nodejs.js
12:58:57.996 |  
12:58:57.996 | ./node_modules/.pnpm/@[email protected]/node_modules/@upstash/redis/esm/platforms/nodejs.js
12:58:57.996 | A Node.js API is used (process.version at line: 44) which is not supported in the Edge Runtime.
12:58:57.996 | Learn more: https://nextjs.org/docs/api-reference/edge-runtime
12:58:57.996 |  
12:58:57.996 | Import trace for requested module:
12:58:57.996 | ./node_modules/.pnpm/@[email protected]/node_modules/@upstash/redis/esm/platforms/nodejs.js
12:58:57.996 |  
12:58:58.004 | info  - Collecting page data...
12:58:58.325 | HOST_URL ----------> https://open-iad8.vercel.app
12:58:58.352 | HOST_URL ----------> https://open-iad8.vercel.app
12:58:58.379 | HOST_URL ----------> https://open-iad8.vercel.app
12:59:06.145 | info  - Generating static pages (0/11)
12:59:06.254 | info  - Generating static pages (2/11)
12:59:06.277 | info  - Generating static pages (5/11)
12:59:06.369 | info  - Generating static pages (8/11)
12:59:07.604 | info  - Generating static pages (11/11)
12:59:07.620 | info  - Finalizing page optimization...
12:59:07.623 |  
12:59:07.665 | Route (pages)                              Size     First Load JS
12:59:07.665 | ┌ ● /                                      11.7 kB         134 kB
12:59:07.665 | ├   └ css/f3cf3fd8e91bf2e7.css             442 B
12:59:07.666 | ├   /_app                                  0 B             104 kB
12:59:07.666 | ├ ○ /404                                   182 B           104 kB
12:59:07.666 | ├ λ /api/app-prompt                        0 B             104 kB
12:59:07.666 | ├ λ /api/auth/[...nextauth]                0 B             104 kB
12:59:07.666 | ├ ℇ /api/generate                          0 B             104 kB
12:59:07.666 | ├ λ /api/revalidate                        0 B             104 kB
12:59:07.666 | ├ λ /api/trpc/[trpc]                       0 B             104 kB
12:59:07.666 | ├ ● /app/[id]                              1.61 kB         129 kB
12:59:07.666 | ├ ○ /app/new                               70.8 kB         199 kB
12:59:07.666 | ├ ○ /coming-soon                           2.05 kB         108 kB
12:59:07.666 | └ ○ /t3                                    923 B           107 kB
12:59:07.666 | + First Load JS shared by all              110 kB
12:59:07.666 | ├ chunks/framework-ac88a2a245aea9ab.js   45.2 kB
12:59:07.666 | ├ chunks/main-7ddcb8ba1d48d819.js        27.7 kB
12:59:07.666 | ├ chunks/pages/_app-dd2fd4228d7aa9c2.js  30.2 kB
12:59:07.666 | ├ chunks/webpack-ee7e63bc15b31913.js     815 B
12:59:07.666 | └ css/c2da3fbb8903acc0.css               6.42 kB
12:59:07.667 |  
12:59:07.667 | ƒ Middleware                               52.3 kB
12:59:07.667 |  
12:59:07.667 | ℇ  (Streaming)  server-side renders with streaming (uses React 18 SSR streaming or Server Components)
12:59:07.667 | λ  (Server)     server-side renders at runtime (uses getInitialProps or getServerSideProps)
12:59:07.667 | ○  (Static)     automatically rendered as static HTML (uses no initial props)
12:59:07.667 | ●  (SSG)        automatically generated as static HTML + JSON (uses getStaticProps)



但是在本机编译失败

执行 npm run build打包时遇到如下问题,尝试在.env文件中添加HOST_URL还是没用

yuanweize@MacBookP OpenGpt % npm run build

> build
> next build

info  - Loaded env from /Users/yuanweize/我的文档/服务器/GITHUB/OpenGpt/.env
info  - Linting and checking validity of types  
info  - Compiled successfully
info  - Collecting page data ..HOST_URL ----------> https://undefined
info  - Collecting page data ...HOST_URL ----------> https://undefined
HOST_URL ----------> https://undefined
info  - Collecting page data  
info  - Generating static pages (11/11)
info  - Finalizing page optimization  

Route (pages)                              Size     First Load JS
┌ ● /                                      11.8 kB         134 kB
├   └ css/f3cf3fd8e91bf2e7.css             442 B
├   /_app                                  0 B             104 kB
├ ○ /404                                   182 B           104 kB
├ λ /api/app-prompt                        0 B             104 kB
├ λ /api/auth/[...nextauth]                0 B             104 kB
├ ℇ /api/generate                          0 B             104 kB
├ λ /api/revalidate                        0 B             104 kB
├ λ /api/trpc/[trpc]                       0 B             104 kB
├ ● /app/[id]                              1.61 kB         130 kB
├ ○ /app/new                               71 kB           199 kB
├ ○ /coming-soon                           2.05 kB         108 kB
└ ○ /t3                                    927 B           107 kB
+ First Load JS shared by all              111 kB
  ├ chunks/framework-2c79e2a64abdb08b.js   45.2 kB
  ├ chunks/main-178bf290a475af1d.js        27.8 kB
  ├ chunks/pages/_app-c42b33e9f2c380f0.js  30.3 kB
  ├ chunks/webpack-ee7e63bc15b31913.js     815 B
  └ css/c2da3fbb8903acc0.css               6.42 kB

ƒ Middleware                               52.3 kB

ℇ  (Streaming)  server-side renders with streaming (uses React 18 SSR streaming or Server Components)
λ  (Server)     server-side renders at runtime (uses getInitialProps or getServerSideProps)
○  (Static)     automatically rendered as static HTML (uses no initial props)
●  (SSG)        automatically generated as static HTML + JSON (uses getStaticProps)

info  - Creating an optimized production build ...%  

from opengpt.

futantan avatar futantan commented on August 21, 2024

不针对此 issue

目前有很多人来咨询如何打包。

本项目是基于 GNU General Public License v3.0 协议,要求基于本项目开发的软件,必须开源。请提供项目开源地址后,再进行讨论。

.env.example 文件包含了全部信息,足以完成本项目的运行和部署。
作为开源项目的维护者,我不提供免费的咨询服务。如需付费咨询,请邮箱联系,价格不低于 1000/次 至多半个小时。

精力有限,请理解。

from opengpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.