我一开始也遇到了一些奇怪的构建问题,在先执行 git pull 更新启动器后就解决了 ![]()
在构建应用程序时,yarn 会抛出一些警告 - 有开发人员可以对此发表评论吗?
I, [2024-01-01T14:41:28.030095 #1] INFO -- : cd /var/www/discourse & su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
warning Pattern ["wrap-ansi@^7.0.0"] is trying to unpack in the same destination "/home/discourse/.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity/node_modules/wrap-ansi-
cjs" as pattern ["wrap-ansi-cjs@npm:wrap-ansi@^7.0.0"]. This could result in non-deterministic behavior, skipping.
warning " > discourse-markdown-it@1.0.0" has unmet peer dependency "xss@*".
warning "workspace-aggregator-36c917e1-4a06-4dbb-be15-7fedd9ba3d70 > discourse > @ember/legacy-built-in-components@0.5.0" has incorrect peer dependency "ember-source@>= 4.8".
warning "workspace-aggregator-36c917e1-4a06-4dbb-be15-7fedd9ba3d70 > discourse > @uppy/aws-s3@3.0.6" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-36c917e1-4a06-4dbb-be15-7fedd9ba3d70 > discourse > @uppy/aws-s3-multipart@3.1.3" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-36c917e1-4a06-4dbb-be15-7fedd9ba3d70 > discourse > @uppy/xhr-upload@3.1.1" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-36c917e1-4a06-4dbb-be15-7fedd9ba3d70 > discourse-plugins > ember-this-fallback@0.4.0" has unmet peer dependency "ember-source@^3.28.11 || ^4.0.0".
warning "workspace-aggregator-36c917e1-4a06-4dbb-be15-7fedd9ba3d70 > discourse > @uppy/aws-s3 > @uppy/xhr-upload@3.3.0" has incorrect peer dependency "@uppy/core@^3.2.1".
I, [2024-01-01T14:42:26.369845 #1] INFO -- : yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ yarn --cwd app/assets/javascripts $(node -e 'const argv = JSON.parse(process.env.npm_config_argv).original; const passthrough = [`--frozen-lockfile`, `-s`].filter(arg => argv.includes(arg)); console.log(passth
rough.join(` `));')
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
最后,是 git clone https://github.com/Toxuru/discourse-sidebar-categories.git 插件导致了问题,导致主页面变为空白,但仍然可以直接访问单个帖子。这是通过尝试和错误(即禁用所有插件,重新编译镜像,然后逐个重新启用插件)发现的。
在日志中也发现了这个 - 这是 git clone https://github.com/mozilla/discourse-email-all.git,为了安全起见,我暂时也禁用了它。
==> unicorn.stderr.log <==
I, [2024-01-01T15:00:30.194986 #85] INFO -- : Refreshing Gem list
Plugin name is 'email-all', but plugin directory is named 'discourse-email-all'
希望这能帮助到其他遇到类似麻烦的管理员。
希望这有帮助。