Code Monkey home page Code Monkey logo

Comments (3)

affine-issue-bot avatar affine-issue-bot commented on July 2, 2024

Issue Status: 🆕 *Untriaged

*🆕 Untriaged

The team has not yet reviewed the issue. We usually do it within one business day.
Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

from affine.

forehalo avatar forehalo commented on July 2, 2024

The APP in dev mode is not suitable for using as a selfhost deployment because it will come with a lot of difference on config and authentication. For instance, in your case, the AFFINE_ADMIN_EMAIL and AFFINE_ADMIN_PASSWORD will not take effect and that's why you can't sign in directly through the credentials specified.

To run the build from scratch, you may build the server code by yarn workspace @affine/server build and run exact the same commands listed in compose.yml

yarn workspace @affine/server build

cd packages/backend/server

# with all environment variables configured correctly
node --import=./scripts/register.js ./dist/data/index.js run
node --import=./scripts/register.js ./dist/index.js

from affine.

jerry-f avatar jerry-f commented on July 2, 2024

开发模式下的 APP 不适合用作自托管部署,因为它在配置和身份验证方面会有很大差异。例如,在您的情况下,和AFFINE_ADMIN_EMAIL不会AFFINE_ADMIN_PASSWORD生效,这就是为什么您无法通过指定的凭据直接登录。

要从头开始运行构建,您可以通过构建服务器代码yarn workspace @affine/server build并运行列出的完全相同的命令compose.yml

yarn workspace @affine/server build

cd packages/backend/server

# with all environment variables configured correctly
node --import=./scripts/register.js ./dist/data/index.js run
node --import=./scripts/register.js ./dist/index.js

我执行到这一步显示, import { register } from 'node:module'; ^^^^^^^^ SyntaxError: The requested module 'node:module' does not provide an export named 'register' at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
好像不能使用node 执行es6模式的文档, 这个怎么解决呢

from affine.

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.