【发布时间】:2019-02-23 21:15:55
【问题描述】:
我在 ubuntu 16.04 机器上安装了 gastby 2
gatsby new netlifycms2 https://github.com/netlify-templates/gatsby-starter-netlify-cms
没有错误。
但是,当我访问 /admin 并单击 使用 netlify 登录时,我收到了消息
无法从 /.netlify/identity 加载设置
我假设我需要这个文件,但没有找到任何关于如何安装它的说明。
我在 static/admin/.netlify/identity 中手动添加了一个空白身份文件,然后运行 gatsby build 和 gatsby serve 但错误消息仍然存在
我已经阅读了authentication and backends 这个blog 这表明:
“启用身份服务后,GoTrue 微服务的托管版本可让您在 /.netlify/identity 下为任何 Netlify 站点添加用户注册和管理。”
我注意到 gotrue cms.js 安装在 admin 目录和其他一些目录中
./public/admin/cms.js
./node_modules/netlify-cms/dist/cms.js
./node_modules/gatsby-plugin-netlify-cms/cms.js
./src/cms/cms.js
netlify 身份插件是否存在未创建此文件的错误?
System:
OS: Linux 4.4 Ubuntu 16.04.5 LTS (Xenial Xerus)
CPU: x64 Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
Shell: 4.3.48 - /bin/bash
Binaries:
Node: 10.10.0 - /usr/bin/node
Yarn: 1.9.4 - /usr/bin/yarn
npm: 6.4.1 - /usr/bin/npm
npmPackages:
gatsby: ^2.0.0 => 2.0.1
gatsby-plugin-netlify: ^2.0.0 => 2.0.0
gatsby-plugin-netlify-cms: ^3.0.0 => 3.0.1
gatsby-plugin-react-helmet: ^3.0.0 => 3.0.0
gatsby-plugin-sass: ^2.0.1 => 2.0.1
gatsby-plugin-sharp: ^2.0.5 => 2.0.5
gatsby-remark-images: ^2.0.1 => 2.0.1
gatsby-source-filesystem: ^2.0.1 => 2.0.1
gatsby-transformer-remark: ^2.1.1 => 2.1.2
gatsby-transformer-sharp: ^2.1.1 => 2.1.1
npmGlobalPackages:
gatsby-cli: 2.4.1
此外,我已经将https://github.com/netlify-templates/gatsby-starter-netlify-cms 克隆到 gitlab 中,但是我遇到了同样的问题。
【问题讨论】:
标签: gatsby netlify netlify-cms