使用Netlify时身份验证失败,我收到消息:
Unable to access identity settings.
When using git-gateway backend make sure to enable Identity service and Git Gateway.
Run Code Online (Sandbox Code Playgroud) 我想要使用 Nuxt.js 和 Vue.js 构建的 Web 应用程序来访问我在 Netlify 环境 UI(设置菜单)中添加的环境变量。
当我运行本地服务器时,我的代码访问 .env 文件并检索正确的代码没有问题。
但是当我用 Netlify 构建它时,它返回未定义。
自从我看到有些人这样做以来,我尝试向环境变量添加不同的前缀:
VUE_APP_MY_VARIABLE
NUXT_APP_MY_VARIABLE
VUE_MY_VARIABLE
NUXT_MY_VARIABLE
Run Code Online (Sandbox Code Playgroud)
我不明白为什么当网站上线时无法访问变量。
如果您缺少任何信息,请告诉我,我会添加它。
提前致谢!
我只是按照文档将其添加到我的 next.config.js 中
module.exports = {
reactStrictMode: true,
async redirects() {
return [
{
source: "/",
destination: "/coming-soon",
permanent: false,
},
];
},
}
Run Code Online (Sandbox Code Playgroud)
即使我构建应用程序,它也确实可以在我的机器上运行,但在 netlify 上,由于某种原因根本没有重定向
我该如何解决这个错误?
我尝试了很多方法,例如使用 Netlify CLI、链接到 git 和 github,但没有任何效果。
该应用程序在开发模式下运行良好,没有错误,但显示错误:在 Netlify 和 Github 页面上未找到 404 页面
我应该怎么办?
有没有人有将.NET / Angular项目发布到Netlify的经验?我正在使用Angular Microsoft.AspNetCore.SpaTemplates模板。在Netlify上,我得到了一个非零的退出代码,这使我无法发布。这是我的输出:
9:44:44 AM: Build ready to start
9:44:44 AM: Fetching cached dependencies
9:44:44 AM: Starting to download cache of 8.9MB
9:44:45 AM: Finished downloading cache in 225.765972ms
9:44:45 AM: Preparing Git Reference refs/heads/master
9:45:00 AM: Running build command: dotnet restore && dotnet build && dotnet run
9:45:02 AM: Downloading and installing node v6.11.4...
9:45:02 AM: Downloading https://nodejs.org/dist/v6.11.4/node-v6.11.4-linux-x64.tar.xz...
9:45:03 AM:
9:45:03 AM: 0.0%
9:45:03 AM:
1.1%
9:45:03 AM:
### 4.9%
9:45:03 AM:
##############
9:45:03 AM: 19.8%
9:45:03 AM: …Run Code Online (Sandbox Code Playgroud) 我在使用Netlify时遇到了一些问题.我使用Jekyll创建了一个新网站,我在Bitbucket上有我的存储库,一切正常.
我在Netlify帐户上设置了Bitbucket的部署,但是当我尝试部署时总是失败,我在日志中收到此错误:
9:59:15 AM: ruby_dep-1.5.0 requires ruby version >= 2.2.5, which is incompatible with the
9:59:15 AM: current version, ruby 2.1.2p95
9:59:15 AM: Error during gem install
9:59:15 AM: Build complete: exit code: 1
9:59:15 AM: Error running command: Build script returned non-zero exit code: 1
9:59:15 AM: Failing build: Failed to build site
9:59:15 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
9:59:15 AM: Finished processing build request in 11.891885136s
Run Code Online (Sandbox Code Playgroud)
我目前正在使用这个版本的ruby 2.4.2p198(2017-09-14修订版59899)[x86_64-darwin17],我已经生成并提交了一个.rubyversion文件: …
使用 VueJS 时遇到问题(第一次使用)
我的路由器:
export default new Router({
mode: 'history',
hash: false,
routes: [
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/gallery',
name: 'Gallery',
component: Gallery
},
{
path: '/contact',
name: 'Contact',
component: Contact
}
]
})
Run Code Online (Sandbox Code Playgroud)
我无法开始<router-link :to="{ name: 'Gallery' }">Gallery</router-link>工作 - 我的网站没有将它们呈现为我的 index.html 中的锚标记(我可能不明白如何/在哪里可以使用 Vue) - 所以我使用的是标准链接,例如<a class="nav-link" href="/gallery">Gallery</a>
问题:
虽然所有这些代码在我的本地机器上运行良好,但它在我上传代码的任何地方都不起作用(我想让它在 Netlify 上运行)。Netlify 和其他站点会覆盖我删除哈希的尝试,因此我的链接然后链接到例如
https://examplesite.com/#/ => https://examplesite.com/gallery#/
我一直在尝试在通过克隆gatsby-starter-default制作的非常基本的 Gatsby 应用程序上设置 NetlifyCMS 。我遵循了来自 Netlify CMS的采购说明,但我不断收到未找到后端的错误。这是我的 Gatsby 设置:
/static/admin/config.yml
backend:
name: appendtoStatic
branch: master
media_folder: static/img
public_folder: /images
collections:
- name: "pages"
label: "Pages"
files:
- file: "src/pages/about.md"
label: "About"
name: "about"
fields:
- {
label: "Template Key",
name: "templateKey",
widget: "hidden",
default: "about-page",
}
- { label: "Title", name: "title", widget: "string" }
- { label: "Body", name: "body", widget: "markdown" }
Run Code Online (Sandbox Code Playgroud)
这是我的 package.json
{
"name": "gatsby-starter-default",
"private": true,
"description": "A simple …Run Code Online (Sandbox Code Playgroud) We implemented a simple nuxt app with a basic form and deployed it to netlify. When pressing the "Submit" Button of the Form, we receive a 404.
Here you can find the link to the deployed netlify app:
EDIT -> Removed Link
After looking through the troubleshoot guide, they listed that the added "netlify" or "data-netlify="true" attributes should not be visible if netlify recognized your form, but they are.
Plus the form can't be found in the "form" configuration tab …
我有一个通过 Netlify 部署的 Nuxt/Vue 应用程序。我正在尝试将 git 版本号和哈希注入body页面的 。我假设有一种非常简单的方法可以做到这一点(但我不知道它是什么!)。
netlify ×10
vue.js ×4
nuxt.js ×3
reactjs ×2
.net-core ×1
angular ×1
c# ×1
deployment ×1
forms ×1
gatsby ×1
git ×1
github ×1
github-pages ×1
javascript ×1
jekyll ×1
netlify-cms ×1
next.js ×1
node.js ×1
ruby ×1
rubygems ×1
version ×1
vue-router ×1